:root { color-scheme: light; font: 16px/1.55 "Source Sans 3", system-ui, -apple-system, "PingFang SC", sans-serif; color: #263430; background: #f5f6f2; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 48rem; margin: 0 auto; padding: 1.2rem 1.1rem 4rem; }
main.login { max-width: 29rem; padding-top: min(12vh,6rem); }
header,.line,.projects,.challenge { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
header { border-bottom: 2px solid #426b5d; margin-bottom: 1rem; }
h1 { font-size: 1.45rem; letter-spacing: -.03em; margin: .7rem 0; }
h2 { font-size: 1.05rem; margin: 0; }
h3 { font-size: 1.3rem; margin: .7rem 0; }
.card { background: white; border: 1px solid #d7dfd8; border-radius: .7rem; padding: 1.15rem; margin-bottom: .95rem; }
.form { display: grid; gap: 1rem; }
label { display: grid; gap: .25rem; font-weight: 600; }
input { border: 1px solid #9aa9a0; border-radius: .35rem; padding: .62rem .7rem; width: 100%; font: inherit; }
button { cursor: pointer; background: #245b47; color: white; border: 0; border-radius: .4rem; padding: .7rem 1rem; font: inherit; font-weight: 600; }
button:focus-visible,input:focus-visible,a:focus-visible { outline: 3px solid #e0a022; outline-offset: 2px; }
button.quiet { background: transparent; color: #245b47; }
button.secondary { background: #e4eee7; color: #245b47; }
.projects { justify-content: start; flex-wrap: wrap; margin-top: .9rem; }
a,.state { color: #245b47; }
.state { font-size: .9rem; text-align: right; }
dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: .7rem 0 0; }
dd { margin: 0; overflow-wrap: anywhere; }
dt,small { color: #58665d; }
.error,.notice,.hint { padding: .65rem .8rem; margin: 0 0 .9rem; border-radius: .45rem; }
.error { background: #fcebe5; color: #833b28; border: 1px solid #efc6b8; }
.notice { background: #fef6e4; color: #784b0a; border: 1px solid #ecd49c; }
.hint { background: #edf4ec; }
ul { margin: .65rem 0 0; padding: 0; list-style: none; }
li { padding: .65rem 0; border-top: 1px solid #e7ebe6; }
.period { display: flex; align-items: end; flex-wrap: wrap; gap: .8rem; margin: .7rem 0; }
.period label { font-weight: 400; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; margin: .75rem 0; font-variant-numeric: tabular-nums; }
th,td { text-align: left; padding: .45rem .35rem; border-bottom: 1px solid #e1e6df; white-space: nowrap; }

/* Worker Workbench Layout */
.worker-workspace { max-width: 36rem; padding-top: .85rem; }
.worker-workspace button { min-height: 2.75rem; }
.worker-workspace button:disabled { background: #e8ece8; color: #55625a; cursor: not-allowed; }
.worker-workspace summary { cursor: pointer; list-style: none; }
.worker-workspace summary::-webkit-details-marker { display: none; }
.worker-workspace summary:focus-visible { outline: 3px solid #e0a022; outline-offset: 3px; }

.workspace-bar { flex-wrap: wrap; padding-bottom: .55rem; margin-bottom: .8rem; border-color: #bdd2c5; }
.project-picker, .current-project { font: inherit; font-size: 1.2rem; font-weight: 700; color: #173f2e; }
.project-picker { min-height: 2.75rem; padding: .25rem .5rem; border: 1px solid #c2d3c7; border-radius: .45rem; background: #fff; cursor: pointer; }
.project-picker:focus-visible { outline: 3px solid #e0a022; outline-offset: 2px; }
.header-actions { display: flex; align-items: center; gap: .45rem; margin-inline-start: auto; }
.today-pill {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .85rem; color: #2a4a3d; background: #e6f1eb;
  border: 1px solid #c3dccf; border-radius: 999px;
  padding: .22rem .65rem; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.today-pill strong { font-weight: 700; color: #164935; }
.worker-workspace header button.quiet { padding: .35rem .55rem; font-size: .92rem; }
.empty-note { margin: 0; color: #526157; }

/* Unified Hero Claim Card */
.hero-claim { display: grid; gap: .8rem; }
.channel-banner { min-width: 0; border: 0; margin: 0; padding: 0; }
.channel-banner legend { padding: 0; margin-bottom: .35rem; font-size: .88rem; font-weight: 600; color: #4d5d54; }
.choices {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .25rem;
  padding: .2rem; background: #f0f4f0; border: 1px solid #d7dfd8; border-radius: .55rem;
}
.choices label {
  display: flex; align-items: center; gap: .45rem; min-height: 2.75rem;
  padding: .4rem .55rem; border: 1px solid transparent; border-radius: .35rem;
  font-weight: 600; cursor: pointer;
}
.choices input { width: 1.05rem; height: 1.05rem; margin: 0; padding: 0; flex-shrink: 0; accent-color: #245b47; }
.choices label.is-checked { background: #fff; border-color: #6e9482; color: #163d2e; }
.choices label.is-disabled { color: #67756c; cursor: not-allowed; }
.choices small { display: inline-block; font-size: .78rem; font-weight: 400; margin-inline-start: .35rem; color: #58685e; }
.choices .channel-badge { padding: .05rem .35rem; margin: 0; border-radius: .3rem; color: #75490f; background: #fff0d3; white-space: nowrap; }
.choices .channel-badge.is-trial { color: #214e70; background: #e6f2fb; }
.channel-guidance { margin: 0; color: #5c5346; font-size: .92rem; }
.offline-choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.offline-choices a[aria-current] { font-weight: 700; }
.worker-workspace:not(.picker-ready) .project-picker,
.worker-workspace:not(.picker-ready) #pick-task,
.picker-ready .offline-choices,
.picker-ready .fallback-project { display: none; }

/* Channel Status Strip & Diagnostics Drawer */
.channel-panel { display: grid; gap: .6rem; }
.channel-strip {
  padding: .75rem .85rem; border-radius: .5rem;
  background: #f5f7f4; border: 1px solid #d9e1da;
}
.channel-strip.is-ready { background: #edf7f1; border-color: #b4d9c4; }
.channel-strip.is-warn { background: #fef7e6; border-color: #ead19a; }
.strip-text { display: grid; gap: .15rem; }
.strip-title { font-size: .95rem; color: #1e3b2f; }
.channel-strip.is-warn .strip-title { color: #7a4b09; }
.strip-meta { font-size: .85rem; color: #516358; font-variant-numeric: tabular-nums; }
.strip-cta { margin-top: .6rem; }

.connection-verdict { margin: 0 0 .55rem; font-size: .95rem; }
.connection-verdict[data-vpn-status="connected"] { color: #175c40; font-weight: 600; }
.vpn-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .65rem; }
.vpn-actions .quiet { text-decoration: underline; text-underline-offset: .2rem; padding-inline: .35rem; }
.vpn-return { margin: .45rem 0 0; font-size: .85rem; color: #55655b; }
.report-unavailable { margin: 0; padding: .65rem .8rem; border-radius: .45rem; background: #fef4df; color: #75490b; border: 1px solid #ead19a; font-size: .92rem; }

.claim-actions { display: grid; gap: .55rem; }
.claim-actions p { margin: 0; }
.claim-actions button { width: 100%; }
.claim-actions .claim { min-height: 3rem; font-size: 1.02rem; }

a.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.55rem; border-radius: .4rem; padding: .45rem .9rem;
  font-weight: 600; font-size: .92rem; text-decoration: none;
}
a.button.secondary { background: #e4eee7; color: #245b47; border: 1px solid #c5dacd; }

.diag-drawer { border-top: 1px solid #e0e6e0; }
.diag-drawer > summary { min-height: 2.75rem; }
.diag-drawer > summary,
.compact-drawer > summary,
.more-orders > summary {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  font-size: .92rem; font-weight: 600; color: #365044;
}
.diag-drawer > summary::after,
.compact-drawer > summary::after,
.more-orders > summary::after {
  content: "展开"; font-size: .82rem; font-weight: 500; color: #245b47; margin-inline-start: auto;
}
.diag-drawer[open] > summary::after,
.compact-drawer[open] > summary::after,
.more-orders[open] > summary::after { content: "收起"; }
.diag-meta { font-size: .82rem; font-weight: 400; color: #5a6a60; font-variant-numeric: tabular-nums; }
.diag-body { margin-top: .7rem; padding-top: .65rem; border-top: 1px solid #e3e8e2; }
.drawer-sections .diag-body { margin-top: .45rem; padding-top: 0; border-top: 0; }
.diag-config-row { display: grid; grid-template-columns: fit-content(50%) minmax(0, 1fr); align-items: start; gap: .8rem; }
.diag-kv { grid-template-columns: auto minmax(0, 1fr); gap: .25rem .6rem; margin: 0; font-size: .85rem; }
.diag-kv code, .receipt-list code { font-size: .82rem; background: #edf4ec; padding: .08rem .28rem; border-radius: .2rem; }
.ppc-note { margin: 0; font-size: .88rem; color: #4a5d52; }
.diag-actions { display: grid; justify-items: start; gap: .15rem; }
.diag-actions button.secondary { min-height: 2.55rem; padding: .45rem .9rem; font-size: .92rem; border: 1px solid #c5dacd; }
.diag-refresh { font-size: .88rem; padding: .35rem .2rem; }
.receipt-list li { padding: .5rem 0; }
.receipt-verdict { font-size: .82rem; font-weight: 600; color: #2a5745; }
.receipt-risk { color: #833b28; }
.drawer-sections { display: grid; gap: .8rem; margin-top: .8rem; padding-top: .75rem; border-top: 1px solid #e4e9e3; }
.drawer-divider { padding-top: .75rem; border-top: 1px solid #e4e9e3; }

/* Pick-Source Badges: distinct text + color + border for list / footprint / search */
.source-badge, .source-tag {
  display: inline-flex; align-items: center;
  border-radius: 999px; font-weight: 600; line-height: 1.25; white-space: nowrap;
}
.source-badge { font-size: .82rem; padding: .22rem .62rem; border: 1px solid transparent; }
.source-tag { font-size: .74rem; padding: .08rem .42rem; border: 1px solid transparent; }
.source-list { background: #e3f5ec; color: #136544; border-color: #9bd5ba; }
.source-footprint { background: #e6f0fc; color: #1d4f91; border-color: #a6c6f0; }
.source-search { background: #fef3dc; color: #8a5308; border-color: #ebd096; }

/* Focused Active Task Card */
.current-task { display: grid; gap: .8rem; border-color: #bdd3c6; }
.task-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.task-badges { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.deadline-chip {
  font-size: .84rem; font-weight: 600; color: #4c5d53;
  font-variant-numeric: tabular-nums;
}
.hotel-title { margin: 0; font-size: 1.38rem; line-height: 1.35; color: #15251f; overflow-wrap: anywhere; }
.date-banner {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap;
  padding: .65rem .85rem; border-radius: .5rem;
  background: #f1f6f3; border: 1px solid #c9dcd1;
}
.date-label { font-size: .84rem; color: #495d52; font-weight: 600; }
.date-value { font-size: 1.05rem; color: #164835; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.date-arrow { color: #6c8478; font-weight: 400; padding-inline: .15rem; }
.task-meta-row {
  display: flex; flex-wrap: wrap; gap: .35rem .95rem;
  font-size: .9rem; color: #54645b; font-variant-numeric: tabular-nums;
}
.task-meta-row strong { color: #24352e; font-weight: 600; }
.task-instruction {
  margin: 0; padding: .65rem .8rem; border-radius: .45rem;
  background: #f7f8f5; border-left: 4px solid #426b5d;
  font-size: .96rem; color: #24342d;
}
.task-instruction.source-accent-list { border-left-color: #1c855a; background: #f2faf5; }
.task-instruction.source-accent-footprint { border-left-color: #2b6cb8; background: #f2f7fd; }
.task-instruction.source-accent-search { border-left-color: #c47d15; background: #fef9ee; }
.live-hint {
  margin: 0; background: #fff3d6; color: #744405;
  border: 1px solid #e8c77b; font-weight: 600;
}
.task-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .75rem;
  padding-top: .25rem;
}
.task-actions .quiet { color: #58695f; }

/* Recent Tasks & Semantic State Pills */
.recent-tasks .order-list { margin-top: .65rem; }
.order-head { align-items: flex-start; gap: .6rem; }
.order-hotel { font-size: .96rem; color: #1f2f29; overflow-wrap: anywhere; }
.order-sub {
  display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .45rem;
  margin-top: .28rem; font-size: .82rem; color: #5a6a60; font-variant-numeric: tabular-nums;
}
.order-reason { margin: .35rem 0 0; font-size: .84rem; color: #7a4b09; }
.state-pill {
  flex-shrink: 0; font-size: .78rem; font-weight: 600;
  padding: .14rem .5rem; border-radius: 999px; white-space: nowrap;
}
.tone-confirmed { background: #e3f5ec; color: #136544; }
.tone-delivering { background: #fef3dc; color: #8a5308; }
.tone-invalid, .tone-released { background: #edf0ee; color: #526058; }
.tone-missed { background: #fcebe5; color: #8b3622; }
.more-orders { margin-top: .55rem; padding-top: .6rem; border-top: 1px solid #e5e9e4; }
.more-orders .order-list { margin-top: .45rem; }

@media (max-width: 30rem) {
  .diag-kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .diag-kv dt { font-size: .78rem; }
  .diag-kv dd + dt { margin-top: .25rem; }
}

@media (max-width: 24rem) {
  .worker-workspace { padding-inline: .75rem; }
  .worker-workspace .card { padding: .95rem; }
  .choices small { display: block; margin-inline-start: 0; }
  .date-banner { flex-direction: column; align-items: flex-start; gap: .2rem; }
}
