/* ============================================================
   实验追踪 — 沿用 booking 的 "Soft Lab" 语汇（圆角、柔和面板、深色侧栏），
   主色换成石墨梅子色，一眼区别于预约系统的蓝绿 / 陶土 / 靛紫。
   不加载任何外部字体 / CSS / JS（用户在国内，外链失败会拖慢首屏）。
   对比度（WCAG，文字压在其底色上）：
     白字 / --primary        7.72   白字 / --primary-deep  12.14
     --ink-faint / --bg       5.05   --ink-soft / surface   6.95
     风险 #A0241C / #FBE4E1   6.25   关注 #7A4D00 / #FCEFC9 6.34
     正常 #1D6638 / #DEF1E4   5.92   超期 #9A3412 / #FDEBDD 6.3
   色条 / 形状（非文本，3:1）：红 4.88、黄 3.63、绿 3.58（对白底）。
   健康度永远是 形状 + 文字 + 颜色 三重编码，不靠颜色单独传达。
   ============================================================ */

:root {
  --bg:        #F2EFF2;
  --bg-tint:   #EAE5EA;
  --surface:   #FFFFFF;
  --surface-2: #F8F6F8;
  --line:      #E3DCE2;
  --line-soft: #EEE9ED;

  --ink:       #25212A;
  --ink-soft:  #5E5764;
  --ink-faint: #6B6370;

  --primary:      #76406C;
  --primary-deep: #4C2A47;
  --primary-soft: #EBDDE7;
  --primary-tint: #F6EFF4;

  /* 健康度：-ink 是压在 -bg 上的文字色，-mark 是形状 / 色条（非文本，按 3:1 选） */
  --red-ink:    #A0241C; --red-bg:    #FBE4E1; --red-mark:    #D0392E;
  --yellow-ink: #7A4D00; --yellow-bg: #FCEFC9; --yellow-mark: #B07D00;
  --green-ink:  #1D6638; --green-bg:  #DEF1E4; --green-mark:  #2E9A55;
  /* 超期：与"风险"刻意不同色相（橙 vs 红），因为它是另一个维度——没人更新，而不是结果不好 */
  --stale-ink:  #9A3412; --stale-bg:  #FDEBDD;
  --star-ink:   #7A4D00; --star-bg:   #FCEFC9;

  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 1px 2px rgba(37,33,42,.05), 0 16px 32px -20px rgba(37,33,42,.30);
  --shadow-sm: 0 1px 2px rgba(37,33,42,.05), 0 8px 18px -14px rgba(37,33,42,.24);
  --ease: cubic-bezier(.2, .7, .25, 1);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
          "Noto Sans CJK SC", "Source Han Sans SC", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
html, body { min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink); background: var(--bg);
  font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(110% 70% at 95% -10%, rgba(118,64,108,.10), transparent 55%),
    radial-gradient(80% 60% at -10% 110%, rgba(76,42,71,.07), transparent 55%);
}
h1, h2, h3 { font-weight: 650; letter-spacing: -.01em; line-height: 1.3; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }
em { font-style: normal; color: var(--red-ink); }
.muted { color: var(--ink-faint); font-size: 13.5px; }
.hint { color: var(--ink-faint); font-size: 13px; }

/* ============ brand ============ */
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark { font-size: 20px; color: var(--primary); line-height: 1; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: .02em; color: var(--ink); }

/* ============ buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 9px 16px; font-size: 14px; font-weight: 600; line-height: 1.3; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s, border-color .18s, color .18s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px -8px rgba(76,42,71,.7); }
.btn-primary:hover { background: var(--primary-deep); }
.btn-ghost { background: var(--surface); color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--surface); color: var(--red-ink); border-color: #EBC3BF; }
.btn-danger:hover { background: var(--red-bg); }
.btn-block { width: 100%; padding: 12px; }
.btn-mini { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ============ fields ============ */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea, .dev-form input {
  font-size: 15px; color: var(--ink); width: 100%;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 11px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus, .dev-form input:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form .field { flex: 0 1 220px; }
.inline-form .field.grow { flex: 1 1 240px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; cursor: pointer; }
.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; }
.check small { display: block; font-weight: 400; font-size: 12.5px; color: var(--ink-faint); }

.banner { font-size: 13.5px; font-weight: 600; padding: 10px 14px; border-radius: var(--radius-sm); }
.banner.bad { background: var(--red-bg); color: var(--red-ink); }

/* ============ login ============ */
.login-screen { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; }
.login-card {
  width: 100%; max-width: 410px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
  padding: 36px 34px 26px; display: flex; flex-direction: column; gap: 16px;
  animation: rise .6s var(--ease) both;
}
.login-title { font-size: 32px; line-height: 1.2; margin-top: 10px; letter-spacing: -.02em; }
.login-sub { color: var(--ink-soft); font-size: 14.5px; }
.login-foot { font-size: 12.5px; color: var(--ink-faint); text-align: center; }
.dev-form {
  display: flex; gap: 8px; align-items: center; margin-top: 4px; padding: 10px;
  border: 1px dashed var(--yellow-mark); border-radius: var(--radius-sm); background: #FFFBEF;
}
.dev-form input { padding: 6px 9px; font-size: 14px; flex: 1; min-width: 0; }
.dev-tag { font-size: 11.5px; font-weight: 700; color: var(--yellow-ink); background: var(--yellow-bg); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }

/* ============ app shell ============ */
.app-shell { position: relative; z-index: 1; display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
/* 侧栏 = 无条件深色块。次级文字 .80 白在 --primary-deep 上 8.35:1；当前项用 rgba(0,0,0,.18)
   压暗而不是半透明白提亮（booking 踩过：白叠加层会把局部背景调亮、对比度掉到 4.0 左右）。 */
.sidebar {
  background: var(--primary-deep); padding: 20px 14px;
  display: flex; flex-direction: column; gap: 24px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { padding: 4px 8px 0; }
.sidebar .brand-name { color: #fff; }
.sidebar .brand-mark { color: rgba(255,255,255,.85); }
.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 14.5px; font-weight: 600; color: rgba(255,255,255,.80);
  transition: background .15s, color .15s;
}
.nav-ico { width: 18px; text-align: center; color: rgba(255,255,255,.55); }
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: rgba(0,0,0,.20); color: #fff; }
.nav-item.active .nav-ico { color: #fff; }
.sidebar-user {
  display: flex; align-items: center; gap: 10px; padding: 10px;
  border-radius: var(--radius-sm); background: rgba(0,0,0,.16);
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: #fff; color: var(--primary-deep);
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.user-meta { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.user-name { font-weight: 600; font-size: 14px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-pill { align-self: flex-start; font-size: 11px; font-weight: 700; color: var(--primary-deep); background: #fff; padding: 0 8px; border-radius: 99px; }
.logout-btn {
  border: 1px solid rgba(255,255,255,.35); background: transparent; color: rgba(255,255,255,.85);
  font-size: 12.5px; padding: 4px 9px; border-radius: 8px; flex-shrink: 0;
}
.logout-btn:hover { color: #fff; border-color: #fff; }

.main-wrap { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 22px 36px 18px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 5;
}
.topbar-text { min-width: 0; }
.page-title { font-size: 24px; letter-spacing: -.015em; overflow-wrap: anywhere; }
.page-date { color: var(--ink-faint); font-size: 13px; margin-top: 2px; }
.topbar-action { display: flex; gap: 8px; flex-shrink: 0; }
.crumbs { font-size: 13px; color: var(--ink-faint); display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 2px; }
.crumbs a { color: var(--primary); font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
.content { padding: 24px 36px 56px; display: flex; flex-direction: column; gap: 22px; max-width: 1480px; width: 100%; }

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px 22px;
}
.panel.narrow { max-width: 720px; }
.section-title { font-size: 17px; margin-bottom: 14px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.section-title small { font-size: 12.5px; font-weight: 500; color: var(--ink-faint); }
.section-title a:hover { color: var(--primary); }

/* ============ health / status chips ============ */
.health {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; line-height: 1; padding: 5px 10px 5px 8px; border-radius: 99px;
}
.h-shape { display: inline-block; width: 9px; height: 9px; flex-shrink: 0; }
/* 三种形状：正常 = 圆、关注 = 三角、风险 = 菱形。黑白打印 / 色弱时也能分辨 */
.h-green .h-shape, .h-shape.h-green { background: var(--green-mark); border-radius: 50%; }
.h-yellow .h-shape, .h-shape.h-yellow { background: var(--yellow-mark); width: 11px; height: 10px; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.h-red .h-shape, .h-shape.h-red { background: var(--red-mark); transform: rotate(45deg); border-radius: 1px; }
.health.h-green  { background: var(--green-bg);  color: var(--green-ink); }
.health.h-yellow { background: var(--yellow-bg); color: var(--yellow-ink); }
.health.h-red    { background: var(--red-bg);    color: var(--red-ink); }

.status-pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; color: #4F4A55; background: #ECE9EE; line-height: 1.2; }
.status-pill.st-active { color: var(--primary-deep); background: var(--primary-soft); }
.status-pill.st-paused { color: #4F4A55; background: #ECE9EE; border: 1px dashed #A49CA9; }

/* ============ overview: stats ============ */
.stat-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 16px 18px; position: relative; overflow: hidden;
}
.stat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line); }
.stat-num { font-size: 34px; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.stat-label { color: var(--ink-soft); font-size: 13px; margin-top: 6px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat-card:first-child::before { background: var(--primary); }
.stat-card.is-new::before { background: var(--primary-soft); }
.stat-card.is-red.hot { background: var(--red-bg); border-color: #F2C8C3; }
.stat-card.is-red.hot::before { background: var(--red-mark); }
.stat-card.is-red.hot .stat-num { color: var(--red-ink); }
.stat-card.is-yellow.hot { background: var(--yellow-bg); border-color: #F1DC9C; }
.stat-card.is-yellow.hot::before { background: var(--yellow-mark); }
.stat-card.is-yellow.hot .stat-num { color: var(--yellow-ink); }
.stat-card.is-stale.hot { background: var(--stale-bg); border-color: #F6CDB0; }
.stat-card.is-stale.hot::before { background: var(--stale-ink); }
.stat-card.is-stale.hot .stat-num { color: var(--stale-ink); }

/* ============ overview: account / lab / cards ============ */
.account-block { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.account-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--line); padding-bottom: 8px; }
.account-name { font-size: 20px; }
.account-name a:hover { color: var(--primary); }
.account-link { font-size: 13px; font-weight: 600; color: var(--primary); }
.account-link:hover { text-decoration: underline; }
.lab-row { display: flex; flex-direction: column; gap: 10px; }
.lab-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lab-name { font-size: 14.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.lab-count { font-size: 12px; font-weight: 700; color: var(--ink-faint); background: var(--bg-tint); padding: 0 8px; border-radius: 99px; }
.add-link { font-size: 13px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.add-link:hover { text-decoration: underline; }
.lab-empty { color: var(--ink-faint); font-size: 13.5px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr)); gap: 12px; }
.exp-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  padding: 13px 15px 12px 18px; display: flex; flex-direction: column; gap: 7px; min-width: 0;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s;
}
.exp-card::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; }
.exp-card.hb-red::before    { background: var(--red-mark); }
.exp-card.hb-yellow::before { background: var(--yellow-mark); }
.exp-card.hb-green::before  { background: var(--green-mark); }
.exp-card.hb-red { border-color: #EFC9C5; }
.exp-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.exp-card.is-closed { background: var(--surface-2); }
.exp-card-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.exp-title { font-size: 15.5px; font-weight: 650; overflow-wrap: anywhere; }
.exp-title a::after { content: ""; position: absolute; inset: 0; } /* 整张卡可点 */
.exp-title a:hover { color: var(--primary); }
.exp-result { font-size: 13.5px; color: var(--ink-soft); overflow-wrap: anywhere; }
.exp-result.muted { font-style: normal; color: var(--ink-faint); }
.exp-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 7px; border-top: 1px solid var(--line-soft); font-size: 12.5px; }
.exp-owner { font-weight: 600; color: var(--ink-soft); }
.upd { color: var(--ink-faint); display: inline-flex; align-items: center; gap: 6px; }
.upd.is-stale { color: var(--stale-ink); font-weight: 700; }
.stale-tag { font-size: 11.5px; font-weight: 700; color: var(--stale-ink); background: var(--stale-bg); border: 1px solid #F6CDB0; padding: 0 6px; border-radius: 6px; }

/* ============ empty state ============ */
.empty-state { text-align: center; padding: 56px 20px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-mark { font-size: 36px; color: var(--primary); }
.empty-state h2 { font-size: 20px; margin: 8px 0; }
.empty-state p { color: var(--ink-soft); max-width: 460px; margin: 0 auto; }
.empty-state a { color: var(--primary); font-weight: 700; text-decoration: underline; }

/* ============ account page ============ */
.notes { white-space: pre-wrap; color: var(--ink-soft); }
.account-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 24px; align-items: start; }
.account-labs { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.account-labs .section-title { margin-bottom: 0; }
.highlights { position: sticky; top: 104px; }
.hl-item { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.hl-item:first-of-type { border-top: none; padding-top: 0; }
.hl-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 12.5px; color: var(--ink-faint); margin-bottom: 8px; }
.hl-meta time { font-weight: 700; color: var(--star-ink); font-variant-numeric: tabular-nums; }
.hl-exp { font-size: 14px; font-weight: 700; color: var(--ink); }
.hl-exp:hover { color: var(--primary); }
.print-head { display: none; }

/* ============ iteration fields (timeline / highlights / feed) ============ */
.it-fields { display: flex; flex-direction: column; gap: 8px; }
.it-f { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
.it-f dt { font-size: 12px; font-weight: 700; color: var(--ink-faint); padding-top: 2px; }
.it-f dd { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.it-f-result dd { font-weight: 600; }
.it-fields.compact .it-f dd { font-size: 14px; }
.star-tag { font-size: 11.5px; font-weight: 700; color: var(--star-ink); background: var(--star-bg); padding: 1px 8px; border-radius: 99px; white-space: nowrap; }

/* ============ experiment page ============ */
.exp-layout {
  display: grid; gap: 22px; align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  grid-template-areas: "info add" "timeline add";
}
.exp-info { grid-area: info; position: relative; padding-left: 26px; }
.exp-info::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 5px; border-radius: 0 5px 5px 0; }
.exp-info.hb-red::before    { background: var(--red-mark); }
.exp-info.hb-yellow::before { background: var(--yellow-mark); }
.exp-info.hb-green::before  { background: var(--green-mark); }
.exp-info-top { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.exp-goal { white-space: pre-wrap; margin-bottom: 14px; font-size: 15px; }
.lbl { display: block; font-size: 12px; font-weight: 700; color: var(--ink-faint); margin-bottom: 2px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 18px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.facts .wide { grid-column: 1 / -1; }
.facts dt { font-size: 12px; font-weight: 700; color: var(--ink-faint); }
.facts dd { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.edit-box { margin-top: 16px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.edit-box summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--primary); width: max-content; }
.edit-box[open] summary { margin-bottom: 14px; }
.danger-zone { margin-top: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.exp-info > .banner { margin-top: 12px; }
.exp-add { grid-area: add; position: sticky; top: 104px; }
.exp-timeline { grid-area: timeline; min-width: 0; }

.timeline { list-style: none; position: relative; padding-left: 26px; display: flex; flex-direction: column; gap: 14px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-item { position: relative; scroll-margin-top: 110px; }
.tl-node { position: absolute; left: -24px; top: 18px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); }
.tl-item.is-hl .tl-node { border-color: var(--yellow-mark); background: var(--yellow-bg); }
.tl-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); padding: 14px 16px; }
.tl-item.is-hl .tl-card { border-color: #EED89A; }
.tl-item:target .tl-card { box-shadow: 0 0 0 3px var(--primary-soft); }
.tl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--ink-faint); margin-bottom: 10px; }
.tl-round { font-weight: 700; color: var(--primary); }
.tl-meta time { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.tl-author { font-weight: 600; color: var(--ink-soft); }
.tl-edit { margin-left: auto; font-weight: 600; color: var(--primary); }
.tl-edit:hover { text-decoration: underline; }

/* ============ feed ============ */
.feed { display: flex; flex-direction: column; gap: 10px; max-width: 900px; }
.feed-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 16px; display: flex; flex-direction: column; gap: 6px; }
.feed-item.is-hl { border-color: #EED89A; }
.feed-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12.5px; color: var(--ink-faint); }
.feed-meta time { font-variant-numeric: tabular-nums; font-weight: 600; }
.feed-author { font-weight: 700; color: var(--ink-soft); }
.feed-path { font-size: 14px; color: var(--ink-soft); overflow-wrap: anywhere; }
.feed-path strong { color: var(--ink); }
.feed-path:hover strong { color: var(--primary); text-decoration: underline; }

/* ============ admin ============ */
.admin-acc { display: flex; flex-direction: column; gap: 14px; }
.admin-acc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.admin-acc-head .section-title { margin-bottom: 0; }
.admin-labs { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--surface-2); border-radius: var(--radius-sm); border: 1px solid var(--line-soft); }
.admin-lab { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.admin-lab .inline-form { flex: 1; }
.add-lab { padding-top: 2px; }

/* ============ animation ============ */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.content > * { animation: rise .45s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* ============ responsive ============ */
@media (max-width: 1180px) {
  .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .account-layout { grid-template-columns: minmax(0, 1fr); }
  .highlights { position: static; }
}
@media (max-width: 980px) {
  .exp-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "info" "add" "timeline"; }
  .exp-add { position: static; }
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; }
  .sidebar-brand { padding: 0; }
  .nav { flex-direction: row; flex-wrap: wrap; flex: 1 1 auto; order: 3; width: 100%; }
  .nav-item { padding: 7px 11px; }
  .sidebar-user { margin-left: auto; padding: 6px 8px; background: transparent; }
  .avatar { width: 28px; height: 28px; font-size: 13px; }
  .topbar { position: static; padding: 16px 16px 14px; flex-wrap: wrap; align-items: center; }
  .content { padding: 18px 16px 44px; gap: 18px; }
  .page-title { font-size: 21px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 12px 14px; }
  .stat-num { font-size: 28px; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .user-meta .role-pill { display: none; }
  .panel { padding: 16px; }
  .exp-info { padding-left: 20px; }
  .it-f { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .login-card { padding: 28px 22px 22px; }
}

/* ============ print（客户页会前打印 / 存 PDF，A4） ============ */
@page { size: A4; margin: 14mm 12mm; }
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; animation: none !important; box-shadow: none !important; }
  body { background: #fff; font-size: 11pt; }
  body::before { display: none; }
  .sidebar, .topbar, .no-print, form, .btn, details, .hint { display: none !important; }
  .app-shell { display: block; }
  .content { padding: 0; max-width: none; gap: 12px; }
  .print-head { display: block; border-bottom: 2px solid #25212A; padding-bottom: 6px; margin-bottom: 4px; }
  .print-head .print-brand { font-size: 9pt; color: #555; letter-spacing: .05em; }
  .print-head h1 { font-size: 20pt; }
  .print-head p { font-size: 9pt; color: #555; }
  .panel { border: none; padding: 0; background: none; }
  .notes-panel { border-left: 3px solid #ccc; padding-left: 10px; }
  .account-layout { display: flex; flex-direction: column-reverse; gap: 16px; } /* 要点先打印 */
  .highlights { position: static; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .exp-card, .hl-item, .lab-head, .tl-card { break-inside: avoid; page-break-inside: avoid; }
  .exp-card { border: 1px solid #ccc; }
  .exp-title a::after { display: none; }
  .lab-row { break-inside: auto; }
  a { color: inherit !important; text-decoration: none !important; }
}
