:root {
  color-scheme: dark;
  --bg:          transparent;
  --bg-sidebar:  rgba(10,12,22,0.88);
  --bg-hover:    rgba(255,255,255,0.06);
  --bg-active:   rgba(0,200,83,0.14);
  --bg-sub:      rgba(255,255,255,0.04);
  --bg-code:     rgba(255,255,255,0.06);
  --border:      rgba(255,255,255,0.08);
  --border2:     rgba(255,255,255,0.15);
  --tx:          rgba(255,255,255,0.92);
  --tx2:         rgba(255,255,255,0.55);
  --tx3:         rgba(255,255,255,0.3);
  --blue:        #2979FF;
  --blue-bg:     rgba(41,121,255,0.15);
  --green:       #00C853;
  --green-bg:    rgba(0,200,83,0.12);
  --orange:      #FF9800;
  --orange-bg:   rgba(255,152,0,0.12);
  --red:         #EF5350;
  --red-bg:      rgba(239,83,80,0.12);
  --purple:      #7C4DFF;
  --purple-bg:   rgba(124,77,255,0.12);
  --font: -apple-system, 'SF Pro Text', system-ui, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-display: -apple-system, 'SF Pro Display', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Menlo', 'Monaco', monospace;
  --sidebar-w: 248px;
  --radius: 12px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.4);
  --shadow-md: 0 4px 24px rgba(0,0,0,.5);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.6);
  --glow-blue: 0 0 24px rgba(41,121,255,0.25);

  --body-bg: #0a0a1a;
  --card-bg: rgba(255,255,255,0.04);
  --card-border: rgba(255,255,255,0.08);
  --card-bg-strong: rgba(255,255,255,0.06);
  --thead-bg: rgba(255,255,255,0.03);
  --row-hover: rgba(255,255,255,0.04);
  --sidebar-bg: transparent;
  --sidebar-border: rgba(255,255,255,0.06);
  --nav-active-bg: rgba(0,200,83,0.14);
  --nav-active-tx: #00C853;
  --title-grad: linear-gradient(135deg, #ffffff 30%, #00C853 100%);
  --auth-bg: #0a0a1a;
  --auth-card-bg: rgba(255,255,255,0.06);
  --auth-input-bg: rgba(255,255,255,0.08);
  --auth-input-border: rgba(255,255,255,0.15);
  --auth-title-tx: rgba(255,255,255,0.92);
  --auth-sub-tx: rgba(255,255,255,0.4);
  --auth-btn-bg: #00C853;
  --auth-btn-tx: #0a0a1a;
  --toast-bg: rgba(20,30,50,0.92);
  --toast-border: rgba(255,255,255,0.12);
  --toast-tx: rgba(255,255,255,0.92);
  --glow-scale: 1;
  --ws-border: rgba(255,255,255,0.06);
  --chip-text-on-light: inherit;
  --toolbar-bg: rgba(10,12,22,0.72);
}

/* ── Background: dark navy gradient (from brochure) ── */
body {
  background: var(--body-bg);
  background-attachment: fixed;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  color: var(--tx);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--blue); text-decoration: none; transition: color .15s; }
a:hover { text-decoration: underline; opacity: .85; }

/* custom cursor removed */

/* ── Layout ── */
.layout { display: flex; min-height: 100vh; position: relative; z-index: 2; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: fixed; top: 0; left: 0; bottom: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  overflow-y: auto;
  display: flex; flex-direction: column;
  z-index: 100;
  transition: transform .24s ease, opacity .2s ease;
}
.ws-header {
  padding: 18px 14px 14px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--ws-border);
  margin-bottom: 4px;
}
.ws-icon {
  width: 26px; height: 26px;
  background: linear-gradient(135deg, #00C853, #2979FF);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff; font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,200,83,0.30);
  letter-spacing: -.5px;
}
.ws-name { font-size: 14px; font-weight: 700; color: var(--tx); font-family: var(--font-display); letter-spacing: -.2px; }
.ws-sub  { font-size: 11px; color: var(--tx3); letter-spacing: .3px; margin-top: 1px; display: flex; align-items: center; gap: 4px; }
.ws-sub::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #00C853; display: inline-block; box-shadow: 0 0 6px #00C853; }
.sidebar-divider { height: 1px; background: var(--border); margin: 4px 0; }
.nav-section-label {
  padding: 6px 14px 2px;
  font-size: 10px; font-weight: 700; color: var(--tx3);
  letter-spacing: .8px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 8px; margin: 1px 6px;
  cursor: pointer; font-size: 13.5px; color: var(--tx2);
  transition: background .15s, color .15s, transform .1s;
  user-select: none; position: relative;
}
.nav-item:hover { background: var(--bg-hover); color: var(--tx); }
.nav-item.active {
  background: var(--nav-active-bg);
  color: var(--nav-active-tx);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--nav-active-tx);
}
.nav-item.active .nav-icon svg { stroke: var(--nav-active-tx); }
.nav-icon { width: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar-footer {
  margin-top: auto;
  padding: 12px 14px 8px;
  border-top: 1px solid var(--border);
}
.footer-row { font-size: 12px; color: var(--tx3); font-family: var(--mono); line-height: 2; }
.footer-row em { color: var(--tx2); font-style: normal; }

/* ── Sidebar collapse ── */
.sidebar { transition: width .24s ease; }
.main    { transition: margin-left .24s ease; }

body.sidebar-collapsed { --sidebar-w: 52px; }
/* 折叠时允许 tooltip 伸出 sidebar 右侧边界 */
body.sidebar-collapsed .sidebar { overflow: visible; }

body.sidebar-collapsed .ws-name,
body.sidebar-collapsed .ws-sub,
body.sidebar-collapsed .nav-section-label,
body.sidebar-collapsed .sidebar-footer,
body.sidebar-collapsed .theme-switcher { display: none; }

body.sidebar-collapsed .nav-item {
  padding: 3px 0;
  justify-content: center;
  align-items: center;
  margin: 0;
  gap: 0;
  font-size: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}
body.sidebar-collapsed .nav-item .nav-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .15s, transform .15s;
}
body.sidebar-collapsed .nav-item .nav-icon svg { width: 15px; height: 15px; }
body.sidebar-collapsed .nav-item:hover .nav-icon {
  background: var(--bg-hover);
  transform: scale(1.08);
}
body.sidebar-collapsed .nav-item.active .nav-icon { background: var(--nav-active-bg); }
body.sidebar-collapsed .nav-item.active .nav-icon svg { stroke: var(--nav-active-tx); }
body.sidebar-collapsed .ws-header {
  justify-content: center;
  padding: 14px 0;
}

/* 折叠状态下，鼠标悬停 nav-item 显示 tooltip（section 名称，从 data-nav-label 读） */
body.sidebar-collapsed .sidebar .nav-item {
  position: relative;
}
body.sidebar-collapsed .sidebar .nav-item[data-nav-label]::after {
  content: attr(data-nav-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  font-size: 12px;
  white-space: nowrap;
  background: var(--card-bg);
  color: var(--tx);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 5px 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s, transform .15s, visibility .15s;
  z-index: 250;
}
body.sidebar-collapsed .sidebar .nav-item[data-nav-label]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 36px;
  margin: 0;
  background: transparent;
  border: none;
  border-top: 1px solid var(--border);
  cursor: pointer;
  color: var(--tx3);
  opacity: 0.5;
  transition: opacity .15s;
  flex-shrink: 0;
}
.sidebar-collapse-btn:hover { opacity: 1; }
.sidebar-collapse-btn svg { transition: transform .24s ease; }
body.sidebar-collapsed .sidebar-collapse-btn {
  border-top: none;
  width: 32px; height: 32px;
  border-radius: 8px;
  margin: 3px auto;
  padding: 0;
  opacity: 1;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.sidebar-collapsed .sidebar-collapse-btn:hover { background: var(--bg-hover); opacity: 1; }
body.sidebar-collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }

/* ── Main ── */
.main { margin-left: var(--sidebar-w); flex: 1; min-height: 100vh; width: 100%; box-sizing: border-box; min-width: 0; }
.page { padding: 56px 72px 100px; width: 100%; box-sizing: border-box; max-width: 100%; }
section { display: none; }
section.active { display: block; animation: pagein .3s cubic-bezier(.16,1,.3,1); }

/* ── Workspace toolbar ── */
/* sidebar inline search */
.sidebar-search-wrap {
  overflow: hidden;
  max-height: 0;
  transition: max-height .22s ease;
  padding: 0 8px;
}
.sidebar-search-wrap.open {
  max-height: 64px;
}
body.sidebar-collapsed .sidebar-search-wrap { display: none; }
.sidebar-search-input {
  width: 100%;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border2);
  background: var(--bg-sub);
  color: var(--tx);
  padding: 0 10px;
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
  margin-top: 4px;
}
.sidebar-search-input:focus { border-color: var(--blue); }
.sidebar-search-input::placeholder { color: var(--tx3); }
.sidebar-search-hint {
  display: block;
  font-size: 11px;
  color: var(--tx3);
  padding: 3px 2px 6px;
  font-family: var(--mono);
  min-height: 0;
}
#nav-search.search-open { background: var(--bg-hover); color: var(--tx); }
.toolbar-search {
  flex: 1;
  min-width: 0;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border2);
  background: var(--card-bg);
  color: var(--tx);
  padding: 0 12px;
  font-size: 13px;
  line-height: 34px;
  font-weight: 500;
  outline: none;
}
.toolbar-search::placeholder { color: var(--tx3); font-weight: 500; }
.toolbar-search:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(41,121,255,0.16);
}
.toolbar-select {
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border2);
  background: var(--card-bg);
  color: var(--tx2);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}
.toolbar-hint {
  font-size: 13px;
  color: var(--tx3);
  font-family: var(--mono);
  white-space: nowrap;
}

@keyframes pagein {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideup {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scalein {
  from { opacity: 0; transform: scale(.94); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* ── Staggered load animations (simplified for perf) ── */
section.active .stat-cell { animation: fadeSlideUp .55s ease-out both; }
section.active .tl-item   { animation: fadeSlideUp .5s ease-out both; }
section.active .version-card { animation: fadeSlideUp .5s ease-out both; }
section.active .meeting-item { animation: fadeSlideUp .45s ease-out both; }
section.active tbody tr { animation: fadeSlideUp .45s ease-out both; }
section.active .auto-item { animation: fadeSlideUp .5s ease-out both; }
section.active .rule-item { animation: fadeSlideUp .4s ease-out both; }
section.active .block-h2 { animation: fadeSlideUp .4s ease-out both; }
section.active .okr-block { animation: fadeSlideUp .35s ease-out both; }

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50%       { box-shadow: var(--glow-blue); }
}

/* ── Page header ── */
.page-icon { font-size: 48px; line-height: 1; margin-bottom: 12px; }
.page-title {
  font-size: 34px; font-weight: 800; letter-spacing: -.8px; line-height: 1.15;
  margin-bottom: 6px; font-family: var(--font-display);
  background: var(--title-grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.page-meta {
  font-size: 13px; color: var(--tx3); font-family: var(--mono);
  margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border);
  letter-spacing: .1px;
}
.page-meta a { color: var(--tx3); }
.page-meta a:hover { color: var(--blue); }

/* block-h2/h3 defined below in Headings section */

/* ── Callout ── */
.callout {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 4px;
  background: var(--card-bg);
  border-left: 3px solid rgba(255,255,255,0.15);
  margin-bottom: 8px; font-size: 14px;
}
.callout-icon { font-size: 16px; flex-shrink: 0; margin-top: 2px; }
.callout-text { flex: 1; color: var(--tx); line-height: 1.65; }
.callout.blue   { background: rgba(41,121,255,0.1);  border-left-color: #2979FF; }
.callout.green  { background: rgba(0,200,83,0.1);    border-left-color: #00C853; }
.callout.orange { background: rgba(255,152,0,0.1);   border-left-color: #FF9800; }
.callout.red    { background: rgba(239,83,80,0.1);   border-left-color: #EF5350; }

/* ── Headings ── */
.block-h2 {
  font-size: 18px; font-weight: 700; color: var(--tx);
  margin: 36px 0 14px; font-family: var(--font-display);
  letter-spacing: -.3px;
}
.block-h3 {
  font-size: 14px; font-weight: 600; color: var(--tx);
  margin: 20px 0 8px;
}

/* ── Chips ── */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 20px;
  white-space: nowrap; vertical-align: middle;
  letter-spacing: .2px;
  transition: transform .15s, box-shadow .15s;
}
.chip:hover { transform: scale(1.04); }
.chip::before { content:''; width:6px; height:6px; border-radius:50%; flex-shrink:0; }
.chip-blue   { background:var(--blue-bg);   color:var(--blue);   } .chip-blue::before   { background:var(--blue); }
.chip-green  { background:var(--green-bg);  color:var(--green);  } .chip-green::before  { background:var(--green); }
.chip-orange { background:var(--orange-bg); color:var(--orange); } .chip-orange::before { background:var(--orange); }
.chip-red    { background:var(--red-bg);    color:var(--red);    } .chip-red::before    { background:var(--red); }
.chip-grey   { background:var(--bg-sub);    color:var(--tx3);    } .chip-grey::before   { background:var(--tx3); }
.chip-teal   { background:rgba(20,184,166,.12); color:#0d9488;   } .chip-teal::before   { background:#0d9488; }
.chip-purple { background:var(--purple-bg); color:var(--purple); } .chip-purple::before { background:var(--purple); }

/* ── Tables ── */
.tbl-wrap { overflow-x: auto; margin-bottom: 4px; border-radius: var(--radius); overflow: hidden; box-shadow: none; border: 1px solid var(--card-border); }
.tbl-wrap table { border: none; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  text-align: left; padding: 10px 14px;
  font-size: 11px; font-weight: 700; color: var(--tx3);
  border-bottom: 1px solid var(--border); white-space: nowrap;
  background: var(--thead-bg); letter-spacing: .4px; text-transform: uppercase;
}
tbody td {
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  vertical-align: middle; line-height: 1.6;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: var(--row-hover); }
.td-mono { font-family: var(--mono); font-size: 12px; color: var(--tx2); }
.td-singleline {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 560px;
}

/* overview quick version table */
.quick-ver-table { table-layout: fixed; }
.quick-ver-table .ov-col-ver { font-weight: 700; white-space: normal; word-break: break-word; }
.quick-ver-table .ov-col-platform { color: var(--tx2); white-space: nowrap; }
.quick-ver-table .ov-col-status { white-space: nowrap; }
.quick-ver-table .ov-col-latest {
  color: var(--tx2);
  white-space: normal;
  word-break: break-word;
}
.quick-ver-table .ov-col-action { text-align: center; vertical-align: middle; }
.quick-ver-table .ov-col-action .vc-update-btn { margin: 0 auto; }

/* ── Version card ── */
.version-grid {
  display: flex; flex-direction: column;
  gap: 12px; margin-bottom: 16px;
}
/* live metrics strip inside version card */
.vc-metrics {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.vc-metric {
  background: var(--card-bg); border-radius: 8px; padding: 10px 12px;
  border: 1px solid var(--card-border);
}
.vc-metric-val { font-size: 20px; font-weight: 700; font-family: var(--font-display); color: var(--tx); }
.vc-metric-label { font-size: 11px; color: var(--tx3); margin-top: 2px; }
.vc-metric-delta { font-size: 11px; font-family: var(--mono); margin-top: 1px; }
.vc-metric-delta.up   { color: var(--green); }
.vc-metric-delta.down { color: var(--red); }

/* GA4 overview metrics */
.ga4-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px; margin: 12px 0 20px;
  width: 100%; box-sizing: border-box;
}
.ga4-cell {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px; padding: 12px 14px;
  position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.ga4-cell::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; border-radius: 3px 0 0 3px;
}
.ga4-cell.c-blue::before { background: #2979FF; }
.ga4-cell.c-green::before { background: #00C853; }
.ga4-cell.c-orange::before { background: #FF6D00; }
.ga4-cell:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ga4-val { font-size: 22px; font-weight: 700; font-family: var(--font-display); }
.ga4-label { font-size: 11px; color: var(--tx3); margin-top: 2px; letter-spacing: .3px; }
.ga4-delta { font-size: 11px; font-family: var(--mono); margin-top: 3px; }
.ga4-delta.up   { color: var(--green); }
.ga4-delta.down { color: var(--red); }
.ga4-week { font-size: 11px; color: var(--tx3); font-family: var(--mono); margin-bottom: 4px; }

/* Meeting panel */
.meeting-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.meeting-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--card-bg-strong); border: 1px solid var(--card-border);
  border-radius: 8px; padding: 9px 12px; font-size: 14px;
}
.meeting-time { font-family: var(--mono); font-size: 12px; color: var(--tx3); white-space: nowrap; }
.meeting-name { flex: 1; }
.meeting-note-btn {
  font-size: 12px; padding: 3px 10px; border-radius: 5px;
  background: var(--blue-bg); color: var(--blue); border: none; cursor: pointer;
  transition: background .12s;
}
.meeting-note-btn:hover { background: var(--blue); color: #fff; }
.meeting-del-btn {
  font-size: 12px; color: var(--tx3); background: none; border: none;
  cursor: pointer; padding: 2px 5px; opacity: 0.5;
}
.meeting-del-btn:hover { opacity: 1; color: var(--red); }
/* 版本卡片默认隐藏内容，JS 处理完后加 .vc-ready 显示，防止闪烁 */
.version-card:not(.vc-ready) > :not(.vc-header) { opacity: 0; max-height: 0; overflow: hidden; transition: none; }
.version-card.vc-ready > * { opacity: 1; max-height: none; overflow: visible; }
.version-card {
  background: var(--bg-sub);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px 20px;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s, border-color .2s;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.version-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  opacity: 0; transition: opacity .3s;
}
.version-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.version-card.vc-archived { display: none !important; }
.version-card:hover::before { opacity: 1; }
.vc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.vc-name { font-size: 17px; font-weight: 600; }
.vc-desc { font-size: 13px; color: var(--tx3); margin-top: 3px; }
.vc-header-right { display: flex; gap: 6px; align-items: center; flex-shrink: 0; margin-left: 10px; }

/* doc links strip */
.vc-links { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 12px; }
.vc-link-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; padding: 2px 8px; border-radius: 3px;
  background: var(--bg-sub); color: var(--tx2);
  border: 1px solid var(--border); text-decoration: none;
  transition: background .1s;
}
.vc-link-badge:hover { background: var(--bg-hover); color: var(--blue); text-decoration: none; }

.vc-platforms {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 12px;
  background: var(--card-bg-strong);
}
.vc-block-title {
  font-size: 11px;
  color: var(--tx3);
  letter-spacing: .35px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.vc-platform-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
}
.vc-platform-row:not(:last-child) { border-bottom: 1px dashed var(--border); }
.vc-platform-name { font-size: 12px; color: var(--tx2); font-weight: 600; }
.vc-schedule {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 12px;
  background: var(--card-bg-strong);
}
.vc-schedule-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 4px 0;
  font-size: 12px;
}
.vc-schedule-date { font-family: var(--mono); color: var(--blue); min-width: 78px; flex-shrink: 0; }
.vc-schedule-text { color: var(--tx2); line-height: 1.45; }
.vt-row.auto-extracted-schedule { display: none; }
.version-card.granular-ready .vc-progress,
.version-card.granular-ready .vc-schedule { display: none; }
.vc-platform-row.clickable { cursor: pointer; }
.vc-platform-row.disabled { opacity: .85; }
.vc-platform-row.clickable:hover { background: var(--bg-hover); border-radius: 6px; padding-left: 6px; padding-right: 6px; margin-left: -6px; margin-right: -6px; }
.vc-platform-row.active { background: var(--bg-hover); border-radius: 6px; padding-left: 6px; padding-right: 6px; margin-left: -6px; margin-right: -6px; }
.vc-platform-expand {
  font-size: 11px;
  color: var(--tx3);
  margin-left: auto;
  padding-left: 8px;
  white-space: nowrap;
}
.vc-platform-detail {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 10px 0 12px;
  background: var(--card-bg);
}
.vc-platform-detail-empty { font-size: 12px; color: var(--tx3); }
.vc-detail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 3px 0;
}
.vc-detail-name { min-width: 88px; color: var(--tx3); }
.vc-detail-val { color: var(--tx2); }
.vc-gantt {
  margin-top: 8px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--bg-sub);
  padding: 8px 10px 10px;
}
.vc-gantt-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--tx3);
  font-family: var(--mono);
  margin-bottom: 8px;
}
.vc-gantt-track {
  position: relative;
  height: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.vc-gantt-bar {
  position: absolute;
  top: 2px;
  height: 14px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(41,121,255,.7), rgba(0,200,83,.7));
}
.vc-gantt-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--orange);
  box-shadow: 0 0 0 2px rgba(255,152,0,.2);
}
.vc-gantt-note { margin-top: 6px; font-size: 11px; color: var(--tx3); }
.vc-gantt-task {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  margin-bottom: 5px;
}
.vc-gantt-task-name { color: var(--tx2); }
.vc-gantt-task-tag {
  font-size: 10px;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  color: var(--tx3);
}
.vc-gantt-task-tag.done { color: var(--green); border-color: color-mix(in oklab, var(--green) 38%, var(--border)); background: color-mix(in oklab, var(--green) 12%, transparent); }
.vc-gantt-task-tag.overdue { color: var(--red); border-color: color-mix(in oklab, var(--red) 38%, var(--border)); background: color-mix(in oklab, var(--red) 10%, transparent); }
.vc-gantt-track.overdue { border-color: color-mix(in oklab, var(--red) 45%, var(--border)); }
.vc-gantt-bar.done { background: linear-gradient(90deg, rgba(0,200,83,.72), rgba(46,204,113,.72)); }
.vc-gantt-bar.overdue { background: linear-gradient(90deg, rgba(255,82,82,.75), rgba(255,138,101,.75)); }
.vc-done-summary {
  font-size: 12px;
  color: var(--green);
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid color-mix(in oklab, var(--green) 35%, var(--border));
  background: color-mix(in oklab, var(--green) 10%, transparent);
}

.vc-progress { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.vp-row { display: flex; align-items: center; gap: 8px; }
.vp-label { font-size: 12px; color: var(--tx3); width: 90px; flex-shrink: 0; }
.vp-bar { flex: 1; height: 3px; background: var(--border); border-radius: 99px; overflow: hidden; }
.vp-fill { height: 100%; border-radius: 99px; }
.vp-pct { font-family: var(--mono); font-size: 11px; color: var(--tx3); width: 36px; text-align: right; }

.vc-timeline { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 5px; }
.vt-row { display: flex; gap: 10px; font-size: 13px; align-items: flex-start; width: 100%; box-sizing: border-box; }
.vt-date { font-family: var(--mono); color: var(--blue); min-width: 40px; max-width: 90px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-text { color: var(--tx2); flex: 1; min-width: 0; overflow: hidden; }
.vt-link { font-size: 11px; color: var(--tx3); margin-left: 4px; }
.vt-link:hover { color: var(--blue); }

.tl-history {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .38s cubic-bezier(.4,0,.2,1), opacity .3s ease;
  width: 100%; box-sizing: border-box;
}
.tl-history.open { max-height: 600px; opacity: 1; }
.expand-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--tx3); cursor: pointer;
  margin-top: 8px; user-select: none;
  background: none; border: none; padding: 0;
  transition: color .1s;
}
.expand-btn:hover { color: var(--blue); }
.expand-arrow { display: inline-block; transition: transform .2s; font-size: 10px; }
.expand-btn.open .expand-arrow { transform: rotate(90deg); }

/* Daily section is display-only; interactions stay in workspace */
#sec-daily .edit-btn,
#sec-daily .callout-edit-btn,
#sec-daily .add-item-btn,
#sec-daily .todo-check,
#sec-daily .zero-btn {
  display: none !important;
}

/* ── Update button ── */
.vc-update-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; padding: 4px 10px; border-radius: 20px;
  background: var(--bg-sub); border: 1px solid var(--border);
  color: var(--tx2); cursor: pointer; font-weight: 600; letter-spacing: .2px;
  transition: background .2s, color .2s, transform .15s, box-shadow .2s; white-space: nowrap;
}
.vc-update-btn:hover {
  background: var(--blue-bg); color: var(--blue); border-color: var(--blue);
  transform: scale(1.05); box-shadow: 0 0 12px rgba(77,159,232,0.2);
}
.vc-update-btn:active { transform: scale(.97); }

/* ── OKR ── */
.okr-block { margin-bottom: 32px; }
.okr-o { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.okr-tag { font-size: 12px; font-weight: 700; color: var(--blue); font-family: var(--mono); }
.okr-title { font-size: 16px; font-weight: 600; }
.okr-weight { font-size: 12px; color: var(--tx3); margin-left: auto; font-family: var(--mono); }
.kr-block { margin-left: 20px; margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.kr-item { border-left: 2px solid var(--border); padding-left: 14px; }
.kr-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.kr-code { font-family: var(--mono); font-size: 12px; color: var(--tx3); }
.kr-title { font-size: 14px; font-weight: 500; }
.kr-prs { display: flex; flex-direction: column; gap: 3px; margin-top: 5px; }
.kr-pr { display: flex; gap: 7px; align-items: flex-start; font-size: 14px; color: var(--tx2); }
.p-tag { font-size: 10px; font-family: var(--mono); padding: 1px 5px; border-radius: 2px; margin-top: 3px; flex-shrink: 0; font-weight: 600; }
.p1 { background: var(--red-bg);    color: var(--red); }
.p2 { background: var(--orange-bg); color: var(--orange); }
.p3 { background: var(--bg-sub);    color: var(--tx3); }

/* ── Timeline standalone ── */
.timeline { display: flex; flex-direction: column; width: 100%; box-sizing: border-box; }
.tl-item { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); width: 100%; box-sizing: border-box; min-width: 0; position: relative; }
.tl-item:last-child { border-bottom: none; }
.tl-date { font-family: var(--mono); font-size: 13px; color: var(--blue); min-width: 40px; max-width: 80px; flex-shrink: 0; padding-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-text { font-size: 14px; color: var(--tx2); flex: 1; min-width: 0; overflow: hidden; }
.tl-del-btn {
  display: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--tx3);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  line-height: 1;
}
.tl-item:hover .tl-del-btn { display: inline-block; }

/* ── Stat row ── */
.stat-row {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 12px; margin-bottom: 24px;
}
.stat-cell {
  background: var(--card-bg);
  border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 16px 20px;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.stat-cell::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 50%, rgba(255,255,255,.03) 100%);
  pointer-events: none;
}
.stat-cell:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-val {
  font-size: 34px; font-weight: 800; letter-spacing: -1.5px; line-height: 1;
  font-family: var(--font-display);
}
.stat-label { font-size: 12px; color: var(--tx3); margin-top: 8px; letter-spacing: .2px; }
.stat-note  { font-size: 12px; margin-top: 6px; }
.stat-note-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  padding: 0;
  cursor: pointer;
}
.stat-note-btn:hover { text-decoration: underline; }

/* ── Zero panel ── */
.zero-panel {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 28px;
  box-shadow: var(--shadow-md);
  transition: box-shadow .3s;
}
.zero-panel:hover { box-shadow: var(--shadow-lg); }
.zero-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: var(--bg-sub);
  border-bottom: 1px solid var(--border);
}
.zero-title { font-size: 15px; font-weight: 700; font-family: var(--font-display); letter-spacing: -.2px; }
.zero-progress-wrap { flex: 1; max-width: 200px; margin: 0 20px; }
.zero-progress-bar { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.zero-progress-fill { height: 100%; border-radius: 99px; background: var(--green); transition: width .4s; }
.zero-count { font-size: 13px; color: var(--tx3); font-family: var(--mono); white-space: nowrap; }
.zero-done-badge {
  display: none; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--green);
}

.zero-group { border-bottom: 1px solid var(--border); }
.zero-group:last-child { border-bottom: none; }
.zero-group-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; cursor: pointer; user-select: none;
  transition: background .1s;
}
.zero-group-header:hover { background: var(--bg-hover); }
.zero-group-icon { font-size: 16px; width: 22px; text-align: center; }
.zero-group-title { font-size: 14px; font-weight: 500; flex: 1; }
.zero-group-count {
  font-size: 22px; font-weight: 700; letter-spacing: -0.5px;
  font-family: var(--mono); min-width: 32px; text-align: right;
  transition: color .3s;
}
.zero-group-count.done { color: var(--green); }
.zero-group-arrow { font-size: 11px; color: var(--tx3); transition: transform .2s; }
.zero-group-header.open .zero-group-arrow { transform: rotate(90deg); }

.zero-items {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .38s cubic-bezier(.4,0,.2,1), opacity .3s ease;
}
.zero-items.open { max-height: 1200px; opacity: 1; }
.zero-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px 9px 52px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  transition: background .1s;
}
.zero-item:hover { background: var(--bg-hover); }
.zero-item-text { flex: 1; color: var(--tx2); line-height: 1.5; }
.zero-item-text.cleared { text-decoration: line-through; color: var(--tx3); }
.zero-item a { color: var(--tx2); }
.zero-item a:hover { color: var(--blue); }
.zero-btn {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; padding: 3px 8px; border-radius: 3px;
  border: 1px solid var(--border); background: var(--bg-sub);
  color: var(--tx2); cursor: pointer; font-weight: 500;
  transition: background .1s, color .1s, border-color .1s;
  white-space: nowrap; flex-shrink: 0;
}
.zero-btn.done-btn:hover   { background: var(--green-bg); color: var(--green); border-color: var(--green); }
.zero-btn.defer-btn:hover  { background: var(--orange-bg); color: var(--orange); border-color: var(--orange); }
.zero-btn.undo-btn:hover   { background: var(--blue-bg); color: var(--blue); border-color: var(--blue); }
.zero-btn.cleared-btn { background: var(--green-bg); color: var(--green); border-color: var(--green); }
.zero-btn.deferred-btn { background: var(--orange-bg); color: var(--orange); border-color: var(--orange); }

/* ── Edit button (text style, like zero-btn) ── */
.edit-btn {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 9px; border-radius: 5px; height: auto; width: auto;
  background: transparent; border: 1px solid var(--border2); cursor: pointer;
  opacity: 0; transition: opacity .15s, background .12s, border-color .12s;
  color: var(--tx2); font-size: 12px; font-family: var(--font);
  vertical-align: middle; margin-left: 4px; white-space: nowrap;
}
tr:hover .edit-btn { opacity: 1; }
.edit-btn:hover { background: var(--blue-bg); border-color: var(--blue); color: var(--blue); }

/* ── Callout edit button ── */
.callout-edit-btn {
  opacity: 0; cursor: pointer; flex-shrink: 0; margin-left: 8px;
  padding: 3px 9px; border-radius: 5px;
  background: transparent; border: 1px solid var(--border2);
  color: var(--tx2); font-size: 12px; font-family: var(--font);
  transition: opacity .15s, background .12s, border-color .12s;
}
.callout:hover .callout-edit-btn { opacity: 1; }
.callout-edit-btn:hover { background: var(--blue-bg); border-color: var(--blue); color: var(--blue); }

/* ── Todo check ── */
.todo-check {
  width: 17px; height: 17px; border: 1.5px solid var(--border2);
  border-radius: 3px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .1s, border-color .1s;
  background: transparent; font-size: 11px; color: white;
}
.todo-check.done { background: var(--green); border-color: var(--green); }
tr.todo-done-row td { text-decoration: line-through; color: var(--tx3); }
tr.todo-done-row td a { color: var(--tx3); }

/* ── Add button ── */
.add-item-btn {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--tx3);
  padding: 8px 0; cursor: pointer;
  border: none; background: none; transition: color .1s;
}
.add-item-btn:hover { color: var(--blue); }

/* ── Bug expand ── */
.bug-row-hidden { display: none; }
.bug-row-hidden.expanded { display: table-row; }
.bug-expand-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--blue); cursor: pointer;
  background: none; border: none; padding: 6px 0; transition: opacity .1s;
}
.bug-expand-btn:hover { opacity: .75; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  animation: fadein .2s ease;
}
.modal {
  background: var(--auth-card-bg);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border: 1px solid var(--card-border);
  border-radius: 14px; padding: 28px; width: 540px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
  animation: scalein .2s cubic-bezier(.34,1.56,.64,1);
}
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; font-family: var(--font-display); }
.modal-sub { font-size: 13px; color: var(--tx3); margin-bottom: 16px; line-height: 1.6; white-space: pre-line; }
.modal textarea {
  width: 100%; min-height: 90px;
  background: var(--bg-sub); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 12px 14px;
  font-size: 14px; font-family: var(--font);
  color: var(--tx); resize: vertical; outline: none; line-height: 1.7;
  transition: border-color .2s, box-shadow .2s;
}
.modal textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(77,159,232,0.12);
}
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.btn {
  font-size: 14px; padding: 8px 18px; border-radius: 8px; border: none;
  cursor: pointer; font-weight: 600; letter-spacing: .1px;
  transition: transform .15s, box-shadow .15s, opacity .1s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { box-shadow: 0 4px 14px rgba(77,159,232,0.4); }
.btn-ghost { background: var(--bg-sub); color: var(--tx2); border: 1px solid var(--border); }
.btn-ghost:hover { opacity: .85; }

/* ── FAB ── */
/* ── Pending Queue Drawer ── */
.pending-fab {
  position: fixed;
  bottom: 88px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--orange);
  border: none;
  cursor: pointer;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(255,152,0,0.35);
  transition: transform .2s, box-shadow .2s;
  color: #fff;
  font-size: 18px;
}
.pending-fab:hover { transform: scale(1.08); }
.pending-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.pending-fab-badge.hidden { display: none; }
.pending-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 92vw;
  height: 100vh;
  background: var(--card-bg);
  border-left: 1px solid var(--card-border);
  box-shadow: -8px 0 32px rgba(0,0,0,0.25);
  z-index: 198;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s ease;
}
.pending-drawer.open { transform: translateX(0); }
.pending-drawer-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pending-drawer-title {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  gap: 8px;
  align-items: center;
}
.pending-drawer-sub { font-size: 11px; color: var(--tx3); margin-top: 2px; font-weight: 400; }
.pending-drawer-close {
  background: none;
  border: none;
  color: var(--tx3);
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.pending-drawer-close:hover { background: var(--bg-hover); color: var(--tx); }
.pending-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px 20px;
}
.pending-item {
  padding: 10px 12px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  margin-bottom: 8px;
  background: var(--bg-sub);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pending-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.pending-item-type {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(41,121,255,0.12);
  color: var(--blue);
  white-space: nowrap;
}
.pending-item-type.t-version { background: rgba(41,121,255,0.12); color: var(--blue); }
.pending-item-type.t-todo    { background: rgba(251,188,5,0.15); color: #b58900; }
.pending-item-type.t-work    { background: rgba(76,175,80,0.15); color: var(--green); }
.pending-item-type.t-bug     { background: rgba(239,68,68,0.12); color: var(--red); }
.pending-item-type.t-meeting { background: rgba(156,39,176,0.12); color: #9c27b0; }
.pending-item-type.t-misc    { background: var(--bg-hover); color: var(--tx3); }
.pending-item-ts { font-size: 10px; color: var(--tx3); font-family: var(--mono); }
.pending-item-target { font-size: 12px; font-weight: 500; color: var(--tx); }
.pending-item-body { font-size: 12px; color: var(--tx2); line-height: 1.45; word-break: break-word; }
.pending-item-empty { text-align: center; color: var(--tx3); font-size: 13px; padding: 40px 10px; }

.fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue);
  border: none;
  cursor: pointer;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(41,121,255,0.45);
  transition: transform .2s, box-shadow .2s, background .2s;
  color: #fff;
}
.fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(41,121,255,0.55);
}
.fab.open {
  background: rgba(255,255,255,0.15);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
html[data-theme="light"] .fab.open,
html[data-theme="system-light"] .fab.open {
  background: rgba(0,0,0,0.12);
}

/* ── AI Panel ── */
.ai-panel {
  position: fixed;
  bottom: 88px;
  right: 28px;
  width: 360px;
  max-height: 560px;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  z-index: 199;
  overflow: hidden;
  transform-origin: bottom right;
  transition: transform .2s cubic-bezier(.4,0,.2,1), opacity .15s;
}
.ai-panel.hidden {
  transform: scale(0.85) translateY(10px);
  opacity: 0;
  pointer-events: none;
}
.ai-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ai-panel-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--tx);
}
.ai-panel-icon {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #00C853, #2979FF);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  flex-shrink: 0;
}
.ai-panel-count { font-size: 11px; color: var(--tx3); font-weight: 400; }
.ai-panel-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--tx3);
  padding: 3px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.ai-panel-close:hover { background: var(--bg-hover); color: var(--tx); }
.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
}
.ai-msg {
  font-size: 12px;
  line-height: 1.5;
  padding: 7px 10px;
  border-radius: 10px;
  max-width: 88%;
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-msg-user {
  align-self: flex-end;
  background: rgba(41,121,255,0.18);
  border: 1px solid rgba(41,121,255,0.25);
  border-radius: 10px 10px 2px 10px;
  color: var(--tx);
}
.ai-msg-ai {
  align-self: flex-start;
  background: var(--bg-sub);
  border-radius: 10px 10px 10px 2px;
  color: var(--tx2);
}
.ai-quick-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  padding: 6px 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.ai-quick-tag {
  padding: 3px 9px;
  background: var(--bg-sub);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 11px;
  color: var(--tx2);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.ai-quick-tag:hover { background: var(--bg-hover); color: var(--tx); }
.ai-input-row {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.ai-input-row textarea {
  flex: 1;
  min-height: 72px;
  max-height: 160px;
  resize: none;
  background: var(--bg-sub);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  color: var(--tx);
  font-family: inherit;
  outline: none;
  line-height: 1.45;
}
.ai-input-row textarea:focus { border-color: var(--blue); }
.ai-input-row textarea::placeholder { color: var(--tx3); }
.ai-send-btn {
  width: 32px;
  height: 32px;
  background: var(--blue);
  border: none;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  transition: opacity .15s;
}
.ai-send-btn:hover { opacity: .85; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(12px) scale(.95);
  background: var(--toast-bg); color: var(--toast-tx);
  border: 1px solid var(--toast-border);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  padding: 11px 22px; border-radius: 24px;
  font-size: 14px; font-weight: 500; z-index: 2000;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s cubic-bezier(.34,1.56,.64,1);
  white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,.4);
  letter-spacing: .1px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }

/* ── Progress bar ── */
.prog-bar { height: 4px; background: var(--border); border-radius: 99px; overflow: hidden; margin: 6px 0 2px; }
.prog-fill { height: 100%; border-radius: 99px; transform-origin: left; transition: width .6s cubic-bezier(.4,0,.2,1); }

/* ── Rule/auto lists ── */
.rule-list { display: flex; flex-direction: column; }
.rule-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.rule-item:last-child { border-bottom: none; }
.rule-num { font-family: var(--mono); font-size: 13px; color: var(--tx3); width: 22px; flex-shrink: 0; padding-top: 2px; }
.auto-item { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.auto-item:last-child { border-bottom: none; }
.auto-time { font-family: var(--mono); font-size: 13px; color: var(--blue); width: 140px; flex-shrink: 0; line-height: 1.9; }
.auto-name { font-family: var(--mono); font-size: 13px; color: var(--orange); margin-bottom: 3px; }
.auto-desc { font-size: 14px; color: var(--tx2); }

/* ── Code block ── */
.code-block { font-family: var(--mono); font-size: 13px; background: var(--bg-code); padding: 14px 16px; border-radius: 4px; color: var(--green); line-height: 1.9; border: 1px solid var(--border); }
.code-comment { color: var(--tx3); }

/* ── Archive table ── */
.archive-row-detail { display: none; background: var(--bg-sub); }
.archive-row-detail.open { display: table-row; }
.archive-detail-cell { padding: 12px 16px 16px 40px; font-size: 13px; color: var(--tx2); }
/* ── Archive reports viewer ── */
.archive-tabs { display:flex; gap:4px; margin-bottom:12px; flex-wrap:wrap; }
.archive-tab { padding:6px 16px; border-radius:6px; border:1px solid var(--card-border); background:transparent; color:var(--tx2); font-size:13px; cursor:pointer; transition:all .15s; }
.archive-tab.active { background:var(--blue); color:#fff; border-color:var(--blue); }
.archive-tab:hover:not(.active) { background:var(--bg-hover); color:var(--tx); }
.archive-search-row { margin-bottom:12px; }
.archive-search-row input { width:100%; padding:7px 12px; border-radius:8px; border:1px solid var(--card-border); background:var(--bg-hover); color:var(--tx); font-size:13px; outline:none; box-sizing:border-box; }
.archive-layout { display:grid; grid-template-columns:220px 1fr; gap:12px; min-height:420px; }
@media (max-width:768px) { .archive-layout { grid-template-columns:1fr; } }
.archive-list { border:1px solid var(--card-border); border-radius:10px; overflow-y:auto; max-height:560px; }
.archive-list-item { padding:10px 14px; cursor:pointer; border-bottom:1px solid var(--card-border); transition:background .12s; }
.archive-list-item:last-child { border-bottom:none; }
.archive-list-item:hover { background:var(--bg-hover); }
.archive-list-item.active { background:var(--nav-active-bg); }
.archive-list-item .ali-date { font-size:13px; font-weight:500; color:var(--tx); }
.archive-list-item .ali-title { font-size:12px; color:var(--tx3); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.archive-content { border:1px solid var(--card-border); border-radius:10px; padding:20px 24px; overflow-y:auto; max-height:560px; font-size:14px; line-height:1.7; }
.archive-content-empty { color:var(--tx3); text-align:center; padding:60px 20px; }
.md-content h1 { font-size:1.25em; font-weight:600; margin:0 0 12px; color:var(--tx); }
.md-content h2 { font-size:1.05em; font-weight:600; margin:20px 0 8px; color:var(--tx); border-bottom:1px solid var(--card-border); padding-bottom:4px; }
.md-content h3 { font-size:1em; font-weight:600; margin:16px 0 6px; color:var(--tx2); }
.md-content p { margin:6px 0; color:var(--tx2); }
.md-content ul,.md-content ol { padding-left:20px; margin:6px 0; }
.md-content li { margin:3px 0; color:var(--tx2); }
.md-content table { border-collapse:collapse; width:100%; margin:10px 0; font-size:13px; }
.md-content th,.md-content td { border:1px solid var(--card-border); padding:5px 10px; text-align:left; }
.md-content th { background:var(--bg-hover); font-weight:500; }
.md-content code { background:var(--bg-hover); padding:1px 5px; border-radius:4px; font-size:12px; font-family:monospace; }
.md-content pre { background:var(--bg-hover); padding:12px; border-radius:8px; overflow-x:auto; margin:10px 0; }
.md-content pre code { background:none; padding:0; }
.md-content hr { border:none; border-top:1px solid var(--card-border); margin:14px 0; }
.md-content a { color:var(--blue); text-decoration:none; }
.md-content a:hover { text-decoration:underline; }
.md-content blockquote { border-left:3px solid var(--blue); padding:4px 12px; color:var(--tx3); margin:8px 0; background:var(--bg-hover); border-radius:0 4px 4px 0; }
.md-content strong { color:var(--tx); }
.archive-snapshot-toggle { font-size:13px; color:var(--tx3); cursor:pointer; margin-top:24px; display:flex; align-items:center; gap:6px; user-select:none; }
.archive-snapshot-toggle:hover { color:var(--tx2); }

/* ── Misc ── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.c-blue   { color: var(--blue); }
.c-green  { color: var(--green); }
.c-orange { color: var(--orange); }
.c-red    { color: var(--red); }
.c-grey   { color: var(--tx3); }
.c-2      { color: var(--tx2); }
.props { margin-bottom: 28px; }
.prop-row { display: flex; align-items: flex-start; gap: 0; padding: 4px 0; border-radius: 4px; transition: background .1s; }
.prop-key { width: 160px; flex-shrink: 0; font-size: 14px; color: var(--tx3); padding-top: 1px; }
.prop-val { font-size: 14px; color: var(--tx); flex: 1; }

/* ── Auth gate ── */
.auth-gate {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--auth-bg);
  display: flex; align-items: center; justify-content: center;
}
.auth-box {
  text-align: center; width: 340px;
  padding: 44px 36px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  background: var(--auth-card-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.auth-icon { font-size: 44px; margin-bottom: 16px; }
.auth-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; color: var(--auth-title-tx); }
.auth-sub { font-size: 14px; color: var(--auth-sub-tx); margin-bottom: 24px; }
.auth-input {
  width: 100%; padding: 12px 14px;
  background: var(--auth-input-bg); border: 1px solid var(--auth-input-border);
  border-radius: 10px; font-size: 18px; color: var(--auth-title-tx);
  outline: none; text-align: center; letter-spacing: 6px;
  margin-bottom: 14px;
}
.auth-input:focus { border-color: #00C853; box-shadow: 0 0 0 3px rgba(0,200,83,0.15); }
.auth-btn {
  width: 100%; padding: 12px; border-radius: 10px;
  background: var(--auth-btn-bg); color: var(--auth-btn-tx);
  border: none; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: opacity .15s, transform .1s;
  letter-spacing: .3px;
}
.auth-btn:hover { opacity: .9; transform: translateY(-1px); }
.auth-error { font-size: 13px; color: var(--red); margin-top: 12px; min-height: 20px; }

/* ── Updates banner ── */
.updates-banner {
  background: var(--blue-bg); border: 1px solid var(--blue);
  border-radius: 8px; padding: 14px 18px; margin-bottom: 22px;
}
.updates-banner-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.updates-banner-title { font-size: 14px; font-weight: 600; color: var(--blue); }
.updates-dismiss-btn {
  font-size: 12px; padding: 3px 10px; border-radius: 4px;
  background: var(--blue); color: white; border: none; cursor: pointer;
  transition: opacity .1s;
}
.updates-dismiss-btn:hover { opacity: .85; }
.updates-list { display: flex; flex-direction: column; gap: 6px; }
.update-item {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 14px; color: var(--tx);
}
.update-ts { font-family: var(--mono); font-size: 12px; color: var(--blue); white-space: nowrap; padding-top: 1px; flex-shrink: 0; }
.update-msg { flex: 1; line-height: 1.5; }

/* ── Responsive ── */
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar { display: none; }
  .mobile-nav {
    display: flex !important; position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--sidebar-bg); border-top: 1px solid var(--sidebar-border);
    backdrop-filter: none; -webkit-backdrop-filter: none;
    z-index: 200; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 18px rgba(15,23,42,0.08);
  }
  .mobile-nav::-webkit-scrollbar { display: none; }
  .mobile-nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    padding: 8px 10px; border-radius: 12px; cursor: pointer; flex-shrink: 0;
    font-size: 12px; line-height: 1.15; font-weight: 500;
    color: var(--tx2);
    transition: background .15s, color .15s, transform .1s;
    min-width: 64px;
    border: 1px solid transparent;
  }
  .mobile-nav-item:hover { background: var(--bg-hover); color: var(--tx); }
  .mobile-nav-item.active {
    background: var(--bg-active);
    color: var(--blue);
    border-color: color-mix(in oklab, var(--blue) 30%, transparent);
  }
  .mobile-nav-item:active { transform: translateY(1px); }
  .mobile-nav-icon { font-size: 16px; line-height: 1; }
  .main { overflow-x: hidden; }
  .page { padding: 24px 14px 100px; overflow-x: hidden; }
  /* version-grid already single-col */
  .stat-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .two-col { grid-template-columns: 1fr; gap: 16px; }
  .page-title { font-size: 26px; }
  .page-icon { font-size: 40px; }
  .block-h2 { font-size: 17px; }

  /* 基础字号 */
  html { font-size: 15px; }

  /* 表格水平滚动 */
  table { font-size: 13px; }
  thead th { padding: 8px 10px; font-size: 10px; }
  tbody td { padding: 9px 10px; }
  .td-mono { font-size: 11px; }

  /* stat 卡片 */
  .stat-cell { padding: 14px 12px; }
  .stat-val { font-size: 24px; }
  .stat-label { font-size: 11px; }
  .stat-note { font-size: 11px; }

  /* GA4 指标 */
  .ga4-row { grid-template-columns: 1fr 1fr; gap: 6px; }
  .ga4-cell { padding: 10px; }
  .ga4-val { font-size: 18px; }

  /* 版本卡片 */
  .vc-header { flex-wrap: wrap; gap: 8px; }
  .vc-header-right { width: 100%; display: flex; justify-content: space-between; }
  .vc-links { gap: 6px; }
  .vc-link-badge { font-size: 11px; padding: 4px 8px; }
  .vc-metrics { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .vc-metric { padding: 8px 10px; }
  .vc-metric-val { font-size: 16px; }

  /* 时间线 */
  .tl-date { font-size: 11px; min-width: 32px; max-width: 60px; }
  .tl-text { font-size: 13px; }
  .timeline { gap: 6px; }

  /* OKR */
  .okr-o { flex-wrap: wrap; gap: 6px; }
  .okr-title { font-size: 15px; }
  .okr-weight { margin-left: 0; }
  .kr-block { margin-left: 12px; }

  /* Callout */
  .callout { padding: 10px 12px; font-size: 13px; }
  .callout-edit-btn { font-size: 11px; padding: 2px 7px; }

  /* 会议面板 */
  .meeting-item { padding: 8px 10px; }
  .meeting-time { font-size: 11px; }
  .meeting-name { font-size: 13px; }
  .meeting-note-btn { font-size: 11px; padding: 2px 8px; }

  /* 进度条 */
  .prog-bar { height: 5px; }
  .prog-fill { height: 5px; }

  /* 零清单 */
  .zero-group-title { font-size: 13px; }
  .zero-item { font-size: 13px; padding: 8px 10px; }
  .zero-btn { font-size: 11px; padding: 4px 8px; }

  /* 编辑/操作按钮 — 移动端始终可见 */
  .edit-btn { opacity: 1; font-size: 11px; padding: 3px 7px; }
  .vc-update-btn { font-size: 11px; padding: 4px 8px; }
  .add-item-btn { font-size: 12px; }

  /* 模态框 */
  .modal-box { width: 92vw; max-width: none; max-height: 85vh; padding: 24px 18px; }
  .modal-title { font-size: 17px; }
  .modal-sub { font-size: 13px; }
  .modal-input { font-size: 14px; padding: 10px 12px; }

  /* 密码框 */
  .auth-box { width: 90vw; padding: 32px 20px; }
  .auth-input { font-size: 16px; }

  /* 所有表格支持水平滚动 */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  thead, tbody, tr { min-width: 100%; }

  /* 周报表格 */
  .tbl-wrap { border-radius: 8px; }

  /* 更新日志 */
  .update-ts { font-size: 11px; }
  .update-msg { font-size: 13px; }

  /* 规范/自动化 */
  .auto-item { flex-direction: column; gap: 4px; }
  .auto-time { font-size: 12px; }
  .auto-name { font-size: 14px; }
  .auto-desc { font-size: 12px; }
  .rule-item { font-size: 13px; padding: 7px 0; }
  .code-block { font-size: 12px; padding: 10px 12px; }

  /* 底部导航安全区域 */
  .mobile-nav { padding-bottom: max(6px, env(safe-area-inset-bottom)); }

  /* 主题切换按钮（移动端在底部导航内显示会更好，但暂时隐藏桌面版的） */
  .theme-switcher { display: none; }

  /* 零清单面板 */
  .zero-panel { margin-bottom: 16px; }
  .zero-header { flex-wrap: wrap; gap: 8px; }
  .zero-progress-wrap { max-width: none; flex: 1; margin: 0; }
}
@media (max-width: 420px) {
  .stat-row { grid-template-columns: 1fr; gap: 6px; }
  .ga4-row { grid-template-columns: 1fr 1fr; gap: 4px; }
  .ga4-cell { padding: 8px; }
  .ga4-val { font-size: 16px; }
  .page { padding: 20px 12px 100px; }
  .stat-val { font-size: 22px; }
  .mobile-nav { gap: 4px; padding-left: 8px; padding-right: 8px; }
  .mobile-nav-item { min-width: 56px; padding: 7px 6px; font-size: 11px; }
  .tl-date { font-size: 10px; min-width: 28px; max-width: 50px; }
  .vt-date { font-size: 10px; min-width: 28px; max-width: 50px; }
  .mobile-nav-icon { font-size: 14px; }
}
@media (min-width: 1400px) {
  .page { padding: 56px 96px 100px; }
  .two-col { gap: 48px; }
  /* version-grid stays single-col on large screens too */
}

/* 跳过导航（键盘用户） */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 10000;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  box-shadow: var(--shadow-md);
}
.skip-link:focus {
  left: 12px;
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* 非当前分区：减少合成层压力（仍由 display 控制显隐） */
section[id^="sec-"]:not(.active) .page {
  content-visibility: auto;
  contain-intrinsic-size: 0 800px;
}

/* ── Light theme (variable overrides only) ── */
html[data-theme="light"],
html[data-theme="system-light"] {
  color-scheme: light;
  --bg-hover:    rgba(0,0,0,0.05);
  --bg-active:   rgba(10,107,92,0.12);
  --bg-sub:      #f7f7f7;
  --bg-code:     rgba(0,0,0,0.04);
  --border:      rgba(0,0,0,0.08);
  --border2:     rgba(0,0,0,0.14);
  --tx:          #1A1916;
  --tx2:         #5C5A55;
  --tx3:         #9B9A97;
  --blue:        #1A5FB4;
  --blue-bg:     rgba(26,95,180,0.1);
  --green:       #0A6B5C;
  --green-bg:    rgba(10,107,92,0.1);
  --orange:      #C4640A;
  --orange-bg:   rgba(196,100,10,0.1);
  --red:         #CC2E2E;
  --red-bg:      rgba(204,46,46,0.1);
  --purple:      #7A52A0;
  --purple-bg:   rgba(122,82,160,0.1);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.1);
  --glow-blue: 0 0 16px rgba(26,95,180,0.12);

  --body-bg: #ffffff;
  --card-bg: #ffffff;
  --card-border: rgba(0,0,0,0.07);
  --card-bg-strong: #ffffff;
  --thead-bg: #fafafa;
  --row-hover: #f8f8f8;
  --sidebar-bg: #ffffff;
  --sidebar-border: rgba(0,0,0,0.06);
  --nav-active-bg: rgba(10,107,92,0.12);
  --nav-active-tx: #0A6B5C;
  --title-grad: linear-gradient(135deg, #1A1916 30%, #0A6B5C 100%);
  --auth-bg: #ffffff;
  --auth-card-bg: #ffffff;
  --auth-input-bg: #ffffff;
  --auth-input-border: rgba(0,0,0,0.12);
  --auth-title-tx: #1A1916;
  --auth-sub-tx: #9B9A97;
  --auth-btn-bg: #0A6B5C;
  --auth-btn-tx: #fff;
  --toast-bg: #ffffff;
  --toast-border: rgba(0,0,0,0.12);
  --toast-tx: #1A1916;
  --glow-scale: 0;
  --ws-border: rgba(0,0,0,0.06);
}

/* ── Theme switcher ── */
.theme-switcher {
  display: flex; gap: 4px;
  padding: 4px 14px 14px;
}
.theme-btn {
  flex: 1; padding: 6px 4px; border-radius: 8px;
  background: transparent; border: 1px solid var(--border);
  color: var(--tx3); font-size: 14px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.theme-btn:hover { background: var(--bg-hover); color: var(--tx); }
.theme-btn.active { background: var(--bg-active); color: var(--green); border-color: var(--green); }
/* ── 任务日志 ── */
.tl-run {
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--bg-sub, var(--bg2, #f7f8fa));
  overflow: hidden;
  transition: border-color .2s;
}
.tl-run.has-fail { border-color: rgba(239,68,68,0.35); }
.tl-run-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
}
.tl-run-row:hover { background: var(--bg-hover); }
.tl-run-time {
  font-weight: 700;
  font-family: var(--mono);
  min-width: 44px;
  color: var(--tx);
}
.tl-run-summary {
  flex: 1;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--tx3);
}
.tl-run-count {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--mono);
}
.tl-run-count.ok   { background: rgba(76,175,80,0.12); color: var(--green); }
.tl-run-count.skip { background: rgba(100,116,139,0.12); color: var(--tx3); }
.tl-run-count.fail { background: rgba(239,68,68,0.12); color: var(--red); }
.tl-run-arrow {
  color: var(--tx3);
  font-size: 11px;
  transition: transform .2s;
}
.tl-run.open .tl-run-arrow { transform: rotate(90deg); }
.tl-run-detail {
  display: none;
  padding: 2px 14px 12px 14px;
  border-top: 1px solid var(--card-border);
  background: var(--bg, transparent);
}
.tl-run.open .tl-run-detail { display: block; }
.tl-step-row {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  font-size: 12px;
  line-height: 1.5;
  border-bottom: 1px dashed rgba(0,0,0,0.05);
}
.tl-step-row:last-child { border-bottom: none; }
.tl-step-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.tl-step-icon.ok   { background: var(--green); }
.tl-step-icon.skip { background: #94a3b8; }
.tl-step-icon.fail { background: var(--red); }
.tl-step-name  { min-width: 110px; font-weight: 500; color: var(--tx); }
.tl-step-note  { flex: 1; color: var(--tx3); word-break: break-word; }
.tl-step-row.fail .tl-step-note { color: var(--red); }

/* ── 全局按钮点击态反馈 ── */
button, .btn, .nav-item, .vc-link-badge, .ai-quick-tag {
  transition: transform .1s ease, filter .1s ease, opacity .1s ease, background .15s ease;
}
button:active:not(:disabled), .btn:active, .nav-item:active,
.vc-link-badge:active, .ai-quick-tag:active {
  transform: scale(0.94);
  filter: brightness(0.88);
}
.fab:active, .pending-fab:active {
  transform: scale(0.88);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
button:disabled:active, button[disabled]:active {
  transform: none;
  filter: none;
}

/* ── 行业速报（工具栏 + 可折叠日分组 + 分类筛选）── */
.industry-module {
  margin-top: 16px;
}
.industry-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: linear-gradient(165deg, var(--bg-sub) 0%, rgba(41,121,255,0.04) 100%);
}
.industry-toolbar-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
  color: var(--tx2);
}
.industry-toolbar-stats strong {
  color: var(--tx);
  font-weight: 600;
  font-family: var(--mono);
}
.industry-toolbar-stats .industry-stat-warn {
  color: var(--red);
}
.industry-toolbar-stats .industry-stat-warn.industry-stat-warn--zero {
  color: var(--tx3);
  font-weight: 400;
}
.industry-toolbar--sticky {
  position: sticky;
  top: 0;
  z-index: 6;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: linear-gradient(165deg, color-mix(in srgb, var(--bg-sub) 88%, transparent) 0%, color-mix(in srgb, rgba(41,121,255,0.04) 88%, transparent) 100%);
  box-shadow: 0 1px 0 var(--card-border);
}
html[data-theme="dark"] .industry-toolbar--sticky {
  background: linear-gradient(165deg, color-mix(in srgb, var(--bg-sub) 85%, transparent) 0%, color-mix(in srgb, rgba(41,121,255,0.06) 90%, transparent) 100%);
}
.industry-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
@media (max-width: 560px) {
  .industry-filter-row {
    margin-left: 0;
    flex-basis: 100%;
    padding-top: 4px;
    border-top: 1px dashed var(--card-border);
  }
  .industry-toolbar-stats {
    flex-basis: 100%;
  }
}
.industry-filter-label {
  font-size: 11px;
  color: var(--tx3);
  margin-right: 4px;
}
.industry-filter-btn {
  border: 1px solid var(--card-border);
  background: var(--bg);
  color: var(--tx2);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.industry-filter-btn:hover {
  border-color: var(--blue);
  color: var(--tx);
}
.industry-filter-btn.is-active {
  background: rgba(41,121,255,0.12);
  border-color: var(--blue);
  color: var(--blue);
  font-weight: 600;
}
.industry-filter-btn[data-industry-filter="security"].is-active {
  background: rgba(239,68,68,0.1);
  border-color: var(--red);
  color: var(--red);
}
.industry-toolbar-actions {
  display: flex;
  gap: 6px;
  width: 100%;
  flex-basis: 100%;
  justify-content: flex-end;
  border-top: 1px dashed var(--card-border);
  padding-top: 10px;
  margin-top: 2px;
}
.industry-tool-btn {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: var(--bg);
  color: var(--tx2);
  cursor: pointer;
}
.industry-tool-btn:hover {
  border-color: var(--blue);
  color: var(--tx);
}
.industry-day {
  margin-bottom: 16px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--bg-sub);
  overflow: hidden;
}
.industry-day > summary.industry-day-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  margin: 0;
  list-style: none;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid transparent;
  transition: background .12s;
}
.industry-day > summary.industry-day-header::-webkit-details-marker { display: none; }
.industry-day[open] > summary.industry-day-header {
  border-bottom-color: var(--card-border);
  background: rgba(0,0,0,0.02);
}
html[data-theme="light"] .industry-day[open] > summary.industry-day-header,
html[data-theme="system-light"] .industry-day[open] > summary.industry-day-header {
  background: rgba(41,121,255,0.04);
}
html[data-theme="dark"] .industry-day[open] > summary.industry-day-header {
  background: rgba(255,255,255,0.03);
}
.industry-tool-btn.is-active {
  border-color: var(--blue);
  color: var(--blue);
  font-weight: 600;
  background: rgba(41,121,255,0.08);
}
.industry-day > summary.industry-day-header::after {
  content: '';
  width: 8px;
  height: 8px;
  margin-left: 4px;
  border-right: 2px solid var(--tx3);
  border-bottom: 2px solid var(--tx3);
  transform: rotate(45deg);
  transition: transform .2s;
  flex-shrink: 0;
}
.industry-day[open] > summary.industry-day-header::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}
.industry-day-icon { font-size: 14px; }
.industry-day-date {
  font-size: 14px;
  font-weight: 600;
  color: var(--tx);
  font-family: var(--mono);
}
.industry-day-count {
  font-size: 11px;
  color: var(--tx3);
  margin-left: auto;
}
.industry-day-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 14px 14px;
}
.industry-item {
  padding: 14px 16px;
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--blue);
  border-radius: 10px;
  background: var(--bg);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.industry-item:hover {
  transform: translateX(2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.industry-item:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.industry-item.warning { border-left-color: var(--red); }
.industry-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.industry-chip {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(41,121,255,0.1);
  color: var(--blue);
}
.industry-chip.ch-security {
  background: rgba(239,68,68,0.12);
  color: var(--red);
}
.industry-chip.ch-tron {
  background: rgba(168,85,247,0.12);
  color: #9333ea;
}
html[data-theme="dark"] .industry-chip.ch-tron { color: #c084fc; }
.industry-chip.ch-wallet {
  background: rgba(34,197,94,0.12);
  color: #15803d;
}
html[data-theme="dark"] .industry-chip.ch-wallet { color: #4ade80; }
.industry-chip.ch-other {
  background: var(--bg-sub);
  color: var(--tx3);
}
.industry-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--tx);
  line-height: 1.45;
  margin-bottom: 6px;
}
.industry-source {
  font-size: 12px;
  font-weight: 400;
  color: var(--tx3);
  margin-left: 4px;
}
.industry-summary {
  font-size: 13px;
  color: var(--tx2);
  line-height: 1.7;
  margin-bottom: 8px;
}
.industry-insight {
  font-size: 12px;
  color: var(--tx3);
  padding: 8px 12px;
  background: rgba(41,121,255,0.06);
  border-radius: 8px;
  line-height: 1.55;
  border-left: 2px solid rgba(41,121,255,0.35);
}
.industry-item.warning .industry-insight {
  background: rgba(239,68,68,0.06);
  border-left-color: rgba(239,68,68,0.45);
}
.industry-insight-label {
  display: inline-block;
  font-weight: 600;
  color: var(--blue);
  margin-right: 6px;
}
.industry-item.warning .industry-insight-label { color: var(--red); }
.industry-empty-hint {
  text-align: center;
  color: var(--tx3);
  font-size: 13px;
  line-height: 1.6;
  padding: 36px 16px;
  max-width: 28rem;
  margin: 0 auto;
}
.industry-empty-hint code {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-sub);
  color: var(--tx2);
}
.industry-inline-link {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}
.industry-inline-link:hover {
  opacity: 0.88;
}
.industry-text-block {
  margin-bottom: 8px;
}
.industry-text-block:last-child {
  margin-bottom: 0;
}
.industry-text-block .industry-summary,
.industry-text-block .industry-insight {
  margin-bottom: 0;
}
.industry-text-block.is-collapsible:not(.is-expanded) .industry-clamp-target {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}
.industry-text-block.is-expanded .industry-clamp-target {
  display: block;
  -webkit-line-clamp: unset;
}
.industry-expand-btn {
  margin-top: 6px;
  padding: 0;
  border: none;
  background: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.industry-expand-btn:hover {
  opacity: 0.85;
}
.industry-text-block:not(.is-collapsible) .industry-expand-btn {
  display: none;
}
.industry-skeleton {
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.industry-skel-pulse {
  height: 10px;
  width: 72%;
  max-width: 360px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-sub), color-mix(in srgb, var(--card-border) 70%, var(--bg-sub)), var(--bg-sub));
  background-size: 200% 100%;
  animation: industry-shimmer 1.15s ease-in-out infinite;
}
@keyframes industry-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .industry-skel-pulse { animation: none; }
  .industry-item,
  .industry-day > summary.industry-day-header::after {
    transition: none;
  }
  .industry-item:hover { transform: none; }
}

/* ── 工作台页（概览）── */
.page--overview .page-meta {
  margin-bottom: 12px;
  padding-bottom: 12px;
}
.overview-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.overview-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.overview-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  margin: 0 0 16px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: color-mix(in srgb, var(--bg-sub) 88%, transparent);
  position: sticky;
  top: 0;
  z-index: 6;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.overview-toc-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--tx3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 2px;
  flex-shrink: 0;
}
.overview-toc-btn {
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: var(--bg);
  color: var(--tx2);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap;
}
.overview-toc-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(41,121,255,0.06);
}
.overview-toc-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
#ov-anchor-ga4,
#weekly-report-panel,
#ov-anchor-stats,
#zero-panel,
#backlog-panel,
#req-panel,
#ov-anchor-meetings,
#ov-anchor-versions,
#ov-anchor-plan,
#ov-anchor-tasklog {
  scroll-margin-top: 20px;
}
.weekly-report-panel {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--bg-sub);
}
@media (max-width: 900px) {
  .overview-toc {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 5px;
    margin-bottom: 12px;
    padding: 8px 8px 10px;
  }
  .overview-toc::-webkit-scrollbar { display: none; }
}

/* ── 工作规范页 ── */
.rules-page .page-meta code {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-sub);
  color: var(--tx2);
}
.rules-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
  padding: 10px 12px;
  margin: 14px 0 18px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--bg-sub);
  position: sticky;
  top: 0;
  z-index: 8;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.rules-toc-label {
  font-size: 11px;
  color: var(--tx3);
  margin-right: 4px;
  font-weight: 600;
}
.rules-toc-btn {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: var(--bg);
  color: var(--tx2);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.rules-toc-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.rules-toc-btn.is-active {
  border-color: color-mix(in srgb, var(--green) 45%, var(--card-border));
  color: var(--nav-active-tx);
  background: var(--nav-active-bg);
  font-weight: 600;
}
.rules-toc-btn--back {
  border-style: dashed;
  opacity: 0.92;
}
@media (min-width: 720px) {
  .rules-toc-btn--back { margin-left: auto; }
}
.rules-section {
  scroll-margin-top: 20px;
  margin-bottom: 22px;
}
.rules-section:last-of-type {
  margin-bottom: 8px;
}
.rules-card {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--bg);
}
.rules-card--danger {
  border-color: color-mix(in srgb, var(--red) 35%, var(--card-border));
  background: color-mix(in srgb, var(--red) 4%, var(--bg));
}
.rules-card .callout {
  margin-bottom: 8px;
}
.rules-card .callout:last-child {
  margin-bottom: 0;
}
.rules-section .block-h2 {
  margin-top: 0;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--card-border);
}
section.active .rules-section .rule-item {
  animation: fadeSlideUp .35s ease-out both;
}
section.active .rules-section .rule-item:nth-child(1) { animation-delay: .02s; }
section.active .rules-section .rule-item:nth-child(2) { animation-delay: .04s; }
section.active .rules-section .rule-item:nth-child(3) { animation-delay: .06s; }
section.active .rules-section .rule-item:nth-child(4) { animation-delay: .08s; }
section.active .rules-section .rule-item:nth-child(5) { animation-delay: .10s; }
section.active .rules-section .rule-item:nth-child(6) { animation-delay: .12s; }
section.active .rules-section .rule-item:nth-child(7) { animation-delay: .14s; }
section.active .rules-section .rule-item:nth-child(8) { animation-delay: .16s; }
@media (prefers-reduced-motion: reduce) {
  section.active .rules-section .rule-item { animation: none; }
}

/* ── 版本状态页 ── */
.page--versions .page-meta {
  margin-bottom: 10px;
  padding-bottom: 12px;
}
.versions-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
  margin-bottom: 14px;
}
.versions-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: color-mix(in srgb, var(--bg-sub) 90%, transparent);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.versions-toc-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--tx3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 2px;
  flex-shrink: 0;
}
.versions-toc-btn {
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: var(--bg);
  color: var(--tx2);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap;
}
.versions-toc-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(41,121,255,0.06);
}
.versions-toc-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.versions-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn-versions-archived {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: var(--bg);
  color: var(--tx2);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.btn-versions-archived:hover {
  border-color: color-mix(in srgb, var(--orange) 45%, var(--card-border));
  color: var(--orange);
}
.btn-versions-archived[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--green) 40%, var(--card-border));
  background: color-mix(in srgb, var(--green) 8%, var(--bg));
  color: var(--nav-active-tx);
}
.versions-link-external {
  font-size: 12px;
  color: var(--tx3);
  text-decoration: none;
  white-space: nowrap;
}
.versions-link-external:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
#sec-versions .version-card[id] {
  scroll-margin-top: 20px;
}
#sec-versions.versions-show-archived .version-card.vc-archived {
  display: block !important;
  opacity: 0.92;
  border-style: dashed;
}
.page--versions .version-card {
  border-radius: 14px;
}
.page--versions .vc-timeline {
  border-top-color: color-mix(in srgb, var(--border) 85%, transparent);
}
.page--versions .vc-footer-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 2px;
  flex-wrap: wrap;
}
.page--versions .versions-archived-banner {
  margin-top: 10px;
}
@media (max-width: 900px) {
  .versions-toc {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
    flex: 1 1 100%;
  }
  .versions-toc::-webkit-scrollbar { display: none; }
  .versions-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .versions-toolbar-right {
    justify-content: flex-end;
  }
}
@media (prefers-reduced-motion: reduce) {
  .page--versions .version-card:hover {
    transform: none;
  }
}
