html { background: var(--bg); }
.login-layout { width: min(100%, 1120px); }
.login-xinbo-logo { display: block; width: 116px; margin-bottom: 26px; }
.input-wrap input { padding-left: 14px; }
.rail-account-card { gap: 8px; }
.rail-account-card form { margin-left: auto; }
.sign-out {
  border: 0;
  background: transparent;
  min-height: 40px;
  padding: 0 4px;
  color: var(--muted);
  white-space: nowrap;
}
.sign-out:hover { color: var(--indigo); }
.nav-shade { display: none; }
.state-message { padding: 24px; background: var(--panel); border-radius: var(--radius); }

.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.pill.success { background: #ecfdf5; color: #047857; }
.pill.warning { background: #fffbeb; color: #92400e; }
.pill.neutral { background: #f1f5f9; color: #475569; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 13px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.35;
  white-space: nowrap;
}
.button:hover { background: #f8faff; border-color: #c7d2fe; color: #4338ca; }
.button.primary { color: white; background: linear-gradient(135deg, #4338ca, #4f46e5); border-color: #4338ca; }
.button.primary:hover { color: white; background: #4338ca; }
.button.quiet { color: var(--muted); background: transparent; border-color: transparent; }
.button.quiet:hover { background: var(--surface); color: #4338ca; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 35px;
  font-weight: 620;
  font-size: 13px;
}
.text-link:hover { text-decoration: underline; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px 22px; margin-bottom: 20px; }
.section-heading h1 { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; letter-spacing: -.025em; }
.section-heading p { color: var(--muted); margin-top: 7px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--panel); box-shadow: var(--shadow-xs); border-radius: var(--radius); padding: 16px 18px; }
.stat p { color: var(--text-secondary); font-size: 13px; font-weight: 630; }
.stat strong { display: block; margin: 2px 0 1px; font-size: clamp(22px, 3vw, 33px); font-weight: 760; line-height: 1.35; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat small { display: block; color: var(--muted); font-size: 12px; }
.stat[data-tone="indigo"] strong { color: #4338ca; }
.stat[data-tone="cyan"] strong { color: #0369a1; }
.stat[data-tone="amber"] strong { color: #92400e; }
.stat[data-tone="mint"] strong { color: #047857; }

.panel { min-width: 0; margin-bottom: 16px; border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow-xs); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 54px; padding: 8px 20px; border-bottom: 1px solid var(--surface); }
.panel-head h2 { font-weight: 680; }
.focus-content, progress { display: block; width: 100%; height: 7px; border: 0; border-radius: 999px; overflow: hidden; appearance: none; background: var(--surface); }
progress::-webkit-progress-bar { background: var(--surface); }
progress::-webkit-progress-value { background: #6366f1; border-radius: 999px; }
progress::-moz-progress-bar { background: #6366f1; border-radius: 999px; }
.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 16px; }
.tabs a { padding: 8px 12px; min-height: 40px; border-radius: var(--control-radius); color: var(--text-secondary); font-weight: 570; background: var(--panel); }
.tabs a.active, .tabs a:hover { background: #eef2ff; color: #4338ca; }
.tabs a.active { font-weight: 650; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 20px; }
.filters input, .filters select {
  width: auto;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  color: var(--text-secondary);
  background: var(--surface-subtle);
  border: 1px solid var(--line-strong);
  border-radius: var(--control-radius);
  padding: 7px 10px;
}
.filters input[type="search"] { flex: 1 1 180px; max-width: 380px; }
.filters input::placeholder { color: var(--muted); }
.filter-count { margin-left: auto; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-scroll { overflow: auto; max-height: 68vh; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-size: 13.5px; }
.data-table th, .data-table td { padding: 11px 12px; vertical-align: middle; border-bottom: 1px solid var(--surface); }
.data-table th { position: sticky; z-index: 1; top: 0; background: var(--surface-subtle); color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { padding-left: 20px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 20px; }
.data-table td small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.data-table tr:hover td { background: #f9faff; }
.question-id { font: 630 12.5px/1.35 var(--mono); color: var(--slate); white-space: nowrap; }
.result-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 70px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
}
.result-button.hit { border-color: #c7d2fe; background: #eef2ff; color: #4338ca; font-weight: 660; }
.result-button:hover { border-color: #818cf8; color: #3730a3; }
.empty-state { padding: 24px 20px; color: var(--muted); }
.publication-list, .progress-list { padding: 0 20px; margin: 0; list-style: none; }
.publication-list li, .progress-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--surface);
}
.publication-list strong { font-weight: 580; }
.publication-list p { font-size: 12.5px; color: var(--muted); }
.publication-list li > a { flex-shrink: 0; }
.progress-list > div:first-child { border-top: 0; }
.progress-list section { flex: 1; }
.step-dot { flex: none; width: 10px; height: 10px; background: #94a3b8; }
.step-dot.complete { background: #059669; }
.step-dot.current { background: #d97706; }
.resource-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 16px 20px; }
.resource-list > div { padding: 13px 15px; background: var(--surface-subtle); border-radius: 12px; }
.resource-list p { margin: 4px 0 3px; }

@media (max-width: 1040px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .topbar { padding-inline-end: 12px; }
  .topbar-date { display: none; }
  .topbar-left { gap: 9px; }
  .top-brand { gap: 8px; }
  .top-brand span { padding-inline-start: 8px; font-size: 12.5px; }
  .nav-shade:not([hidden]) { display: block; position: fixed; inset: var(--topbar) 0 0; z-index: 39; border: 0; background: rgb(15 23 42 / .31); }
  .rail { position: fixed; left: 0; top: var(--topbar); transform: translateX(-100%); visibility: hidden; }
  .nav-open .rail { transform: none; visibility: visible; }
  .main { padding-inline: 14px; }
  .section-heading { align-items: start; flex-direction: column; }
  .resource-list { grid-template-columns: 1fr; }
  .login-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; min-height: auto; }
  .login-project-desc { margin-bottom: 12px; }
  .login-xinbo-logo { margin-bottom: 12px; width: 86px; }
}
@media (max-width: 510px) {
  .stat { padding: 12px; }
  .stats-grid { gap: 9px; }
  .focus-content, .panel-head, .filters, .publication-list, .progress-list { padding-inline: 14px; }
  .filters input[type="search"] { max-width: none; flex: 1 0 100%; }
  .data-table th:first-child, .data-table td:first-child { padding-left: 12px; }
  .data-table th:last-child, .data-table td:last-child { padding-right: 12px; }
  .measurement thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .measurement tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 10px 12px; border-bottom: 1px solid var(--surface); }
  .measurement td { border: 0; padding: 4px 0; }
  .measurement td:first-child, .measurement td:last-child { padding-inline: 0; }
  .measurement td:nth-child(-n+2) { grid-column: 1 / -1; }
  .measurement td[data-platform-label]::before { content: attr(data-platform-label); display: block; color: var(--muted); font-size: 11px; margin-bottom: 3px; }
  .measurement .result-button { min-height: 40px; }
  .progress-list > div { gap: 8px; }
  .publication-list li > a { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-link, .rail, .button { transition: none; }
}

.capture-links { display: flex; align-items: center; flex-wrap: wrap; gap: 0 9px; }
.ed-detail .capture-links { margin-top: -10px; margin-bottom: 9px; }
