:root {
  color-scheme: light;
  --bg: #f8f9fa;
  --panel: #fff;
  --text: #202124;
  --muted: #70757d;
  --line: #e6e8eb;
  --soft: #f3f4f6;
  --error: #a53232;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-weight: 550; text-decoration: none; cursor: pointer; white-space: nowrap; }
button:hover:not(:disabled), .button:hover { border-color: #b8bcc3; }
button:disabled, fieldset:disabled button { opacity: .45; cursor: not-allowed; }
button.primary, .button.primary { background: var(--text); border-color: var(--text); color: #fff; }
button.primary:hover:not(:disabled) { background: #373a40; }
button.small, .button.small { min-height: 34px; padding: 5px 12px; font-size: 12px; }
button.danger { color: var(--error); }
:focus-visible { outline: 2px solid #555; outline-offset: 3px; }
input, select { display: block; width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #dfe2e6; border-radius: 8px; background: white; }
input:disabled, select:disabled { background: var(--soft); color: var(--muted); }
label { display: block; margin-bottom: 8px; font-weight: 550; font-size: 13px; }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1 { font-size: 28px; line-height: 1.4; font-weight: 700; letter-spacing: -.6px; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
.skip-link { position: absolute; left: 16px; top: -60px; padding: 8px 15px; background: white; z-index: 5; }
.skip-link:focus { top: 10px; }
.site-header { display: flex; align-items: center; gap: 38px; padding: 16px 32px; border-bottom: 1px solid var(--line); background: #fff; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.brand-caption { font-size: 15px; font-weight: 550; margin-left: 6px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; background: var(--text); color: white; border-radius: 10px; }
.brand-mark svg { width: 25px; height: 25px; }
nav { display: flex; gap: 6px; flex-wrap: wrap; }
nav a { padding: 8px 15px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 550; }
nav a[aria-current="page"] { background: var(--text); color: white; }
.header-account { margin-left: auto; font-size: 12px; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
main { max-width: 1180px; margin: 0 auto; padding: 36px 28px 48px; }
.page-heading, .card-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.page-heading { margin-bottom: 24px; }
.page-description { margin-top: 6px; color: var(--muted); font-size: 13px; }
.card { border: 1px solid var(--line); border-radius: 13px; background: var(--panel); overflow: hidden; }
.card-heading { padding: 20px 24px; border-bottom: 1px solid var(--line); }
.padded { padding: 24px; }
.muted { color: var(--muted); font-size: 12px; font-weight: 400; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 550; letter-spacing: .4px; }
.footnote { margin-top: 18px; color: var(--muted); font-size: 12px; }
.field-hint { margin-top: 8px; color: var(--muted); font-size: 12px; }
.full-width { width: 100%; }
.badge { display: inline-block; font-size: 11px; line-height: 1.8; border-radius: 5px; background: var(--soft); padding: 2px 9px; white-space: nowrap; font-weight: 550; }
.badge.active { background: var(--text); color: white; }
.badge.error { background: #faf0f0; color: var(--error); }
.notice { border: 1px solid var(--line); border-radius: 9px; background: white; padding: 12px 16px; margin-bottom: 22px; overflow-wrap: anywhere; }
.notice.error { border-color: #e7cece; background: #fffafa; color: var(--error); }
.action-feedback { font-size: 13px; margin-top: 15px; padding-left: 12px; border-left: 2px solid var(--text); overflow-wrap: anywhere; }
.action-feedback.error { color: var(--error); border-color: var(--error); }
.login-layout { max-width: 440px; margin: 54px auto 0; }
.login-heading { margin-bottom: 25px; }
.login-heading h1 { margin-top: 10px; }
.login-card { padding: 28px; }
.secret-input { display: flex; align-items: stretch; border: 1px solid #dfe2e6; border-radius: 8px; overflow: hidden; }
.secret-input input { border: 0; border-radius: 0; }
.secret-input input:focus-visible { outline-offset: -3px; }
.secret-input button { border: 0; border-radius: 0; color: var(--muted); font-size: 12px; padding: 8px 13px; }
#login-submit { margin-top: 25px; }
.login-footnote { color: var(--muted); text-align: center; font-size: 11px; margin-top: 18px; }
.work-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); align-items: start; gap: 22px; }
.task-column { min-width: 0; }
.task-column > .card + .card { margin-top: 22px; }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 45px 24px; gap: 9px; }
.empty-state p { max-width: 360px; color: var(--muted); font-size: 13px; }
.empty-state .button { margin-top: 10px; }
.empty { color: var(--muted); font-size: 12px; padding: 30px 20px; text-align: center; }
.task-detail { padding: 23px 24px; }
.task-title-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 21px; }
.task-title-row h3 { font-size: 18px; }
.task-title-row p { margin-top: 4px; overflow-wrap: anywhere; }
.task-percentage { font-size: 28px; font-weight: 600; letter-spacing: -.7px; font-variant-numeric: tabular-nums; }
progress { appearance: none; border: 0; display: block; height: 5px; width: 100%; background: #eceef0; border-radius: 6px; overflow: hidden; }
progress::-webkit-progress-bar { background: #eceef0; }
progress::-webkit-progress-value { background: #34383d; border-radius: 6px; }
progress::-moz-progress-bar { background: #34383d; border-radius: 6px; }
.progress-caption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 11px; color: var(--muted); margin-top: 9px; font-variant-numeric: tabular-nums; }
.task-message { margin-top: 22px; padding: 11px 13px; background: #f7f8f9; border-radius: 6px; font-size: 12px; overflow-wrap: anywhere; }
.task-message.error { color: var(--error); background: #fff7f7; }
.task-times { display: grid; gap: 10px; margin-top: 20px; font-size: 12px; }
.task-times > div { display: flex; justify-content: space-between; gap: 15px; }
dt { color: var(--muted); }
.task-times dd { text-align: right; font-variant-numeric: tabular-nums; }
.task-bottom { display: flex; align-items: center; justify-content: flex-end; margin-top: 20px; }
.logs { max-height: 310px; overflow: auto; scrollbar-gutter: stable; }
.log-line { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 11px 24px; font-size: 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.log-line:last-child { border-bottom: 0; }
.log-line time { color: var(--muted); font-variant-numeric: tabular-nums; }
.log-line.error span { color: var(--error); }
.log-line.warn span { color: #87612c; }
.run-editor .padded { padding-top: 21px; }
.text-link { display: inline-block; margin-top: 12px; font-size: 12px; text-underline-offset: 3px; }
.section-divider { border-top: 1px solid var(--line); padding-top: 21px; margin-top: 23px; }
#start-run { margin-top: 24px; }
.inline-confirm { margin-top: 17px; padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: #fafafa; }
.inline-confirm p { margin-top: 5px; font-size: 12px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 13px; }
.actions button { min-height: 35px; font-size: 12px; }
.history-toolbar { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; padding: 22px 24px; }
.history-toolbar h2 { font-size: 15px; }
.history-toolbar h2 .badge { margin-left: 8px; font-weight: 400; }
.history-feedback { margin: 0 24px 19px; }
.list-caption { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; background: #fafbfc; padding: 10px 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.history-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.history-row:last-child { border-bottom: 0; }
.history-number { color: #92969e; font-size: 17px; font-variant-numeric: tabular-nums; }
.history-identity { min-width: 0; }
.history-identity h3 { font-size: 14px; overflow-wrap: anywhere; }
.history-identity p { margin-top: 5px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.history-actions { display: flex; gap: 8px; align-items: center; }
.history-row.selected { background: #fafbfc; }
.history-row .badge { margin-left: 8px; font-size: 10px; }
.list-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 18px 24px; border-top: 1px solid var(--line); }
.account-card { max-width: 760px; }
.account-facts { display: grid; grid-template-columns: 1.2fr 1.3fr .6fr; gap: 22px; margin-bottom: 24px; }
.account-facts dt { font-size: 12px; margin-bottom: 7px; }
.account-facts dd { font-size: 13px; font-weight: 550; overflow-wrap: anywhere; }
#show-logout { margin-top: 17px; }

@media (max-width: 900px) {
  .site-header { gap: 22px; padding: 15px 22px; }
  .header-account { display: none; }
  .work-layout { grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 18px; }
  .card-heading, .padded, .task-detail { padding: 20px; }
  .log-line { padding: 11px 20px; }
  .task-times > div { flex-direction: column; gap: 2px; }
  .task-times dd { text-align: left; }
}

@media (max-width: 680px) {
  .site-header { padding: 15px 16px; gap: 13px; }
  .brand { font-size: 16px; width: 100%; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  nav a { padding: 7px 13px; font-size: 12px; }
  main { padding: 26px 16px 36px; }
  h1 { font-size: 24px; }
  .page-heading { gap: 12px; margin-bottom: 22px; }
  .page-description { font-size: 12px; }
  .login-layout { margin-top: 34px; }
  .login-card { padding: 23px; }
  .work-layout { grid-template-columns: 1fr; gap: 20px; }
  .run-editor { grid-row: 1; }
  .work-layout.is-active-task .run-editor { grid-row: auto; }
  .task-times > div { flex-direction: row; gap: 12px; }
  .task-times dd { text-align: right; }
  .task-percentage { font-size: 25px; }
  .history-toolbar { padding: 20px; }
  .history-row { grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 18px 20px; }
  .history-actions { grid-column: 2; }
  .list-caption, .list-footer { padding-left: 20px; padding-right: 20px; }
  .account-facts { grid-template-columns: 1fr; gap: 20px; }
  .notice { font-size: 12px; }
}

@media (max-width: 380px) {
  .task-times > div { flex-direction: column; gap: 2px; }
  .task-times dd { text-align: left; }
  .log-line { grid-template-columns: 1fr; gap: 2px; }
}
