/* ==========================================================================
   14to17 · 样式
   组织顺序：基础 → 布局 → 组件 → 页面 → 响应式
   组件命名沿用 BEM 风格（block__element--modifier），便于在 HTML 里一眼看出关系。
   ========================================================================== */

/* ---------------- 基础 ---------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: var(--fw-semibold); line-height: var(--lh-tight); letter-spacing: -.015em; }
p { margin: 0; }
a { color: var(--brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

[hidden] { display: none !important; }

/* 焦点可见：键盘用户的唯一依靠，任何组件都不许去掉 */
:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* 跳转到主内容（屏幕阅读器 / 键盘用户） */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand-600); color: #fff; padding: var(--sp-3) var(--sp-5);
  border-radius: 0 0 var(--r-sm) 0; font-weight: var(--fw-semibold);
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.mono { font-family: var(--font-mono); font-size: .92em; }
.num { font-variant-numeric: tabular-nums; }

/* ---------------- 布局 ---------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-5); }
.stack > * + * { margin-top: var(--sp-4); }
.row { display: flex; align-items: center; gap: var(--sp-3); }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ---------------- 顶栏 ---------------- */
.header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.header__inner {
  height: var(--header-h); display: flex; align-items: center; gap: var(--sp-5);
  max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-5);
}
.brand { display: flex; align-items: center; gap: var(--sp-3); font-weight: var(--fw-bold); font-size: var(--fs-lg); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 11px; flex: none;
  background: linear-gradient(135deg, var(--brand-600), var(--accent-500));
  display: grid; place-items: center; color: #fff; font-size: var(--fs-sm);
  font-weight: var(--fw-bold); letter-spacing: -.03em;
  box-shadow: 0 4px 12px -4px rgba(91, 75, 232, .55);
}
.brand__mark span { transform: translateY(-1px); }
.brand__text { color: var(--text-primary); }
.brand__sub { font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text-tertiary); letter-spacing: 0; }

.nav { display: flex; align-items: center; gap: var(--sp-1); margin-left: auto; }
.nav__item {
  min-height: 44px; padding: 0 var(--sp-4); display: inline-flex; align-items: center;
  border-radius: var(--r-sm); border: 0; background: transparent; cursor: pointer;
  color: var(--text-secondary); font-size: var(--fs-base); font-weight: var(--fw-medium);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.nav__item:hover { background: var(--bg-subtle); color: var(--text-primary); text-decoration: none; }
.nav__item[aria-current="page"] { background: var(--brand-50); color: var(--brand-700); }

/* ---------------- 按钮 ----------------
   四级层次：primary（主行动）/ secondary（次行动）/ ghost（低干扰）/ danger（破坏性）
   全部保证 ≥44px 触摸高度 —— 学生大量在手机上操作。 */
.btn {
  --btn-h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--btn-h); padding: 0 var(--sp-5);
  border-radius: var(--r-sm); border: 1px solid transparent;
  font-size: var(--fs-base); font-weight: var(--fw-semibold);
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary { background: var(--brand-600); color: #fff; box-shadow: 0 2px 8px -2px rgba(91, 75, 232, .5); }
.btn--primary:hover { background: var(--brand-700); box-shadow: 0 6px 16px -4px rgba(91, 75, 232, .55); }

.btn--accent { background: var(--accent-700); color: #fff; }   /* 6.0:1 ✅ */
.btn--accent:hover { background: var(--accent-600); }

.btn--secondary { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border-strong); }
.btn--secondary:hover { background: var(--bg-subtle); border-color: var(--n-400); }

.btn--ghost { background: transparent; color: var(--text-secondary); }
.btn--ghost:hover { background: var(--bg-subtle); color: var(--text-primary); }

.btn--danger { background: var(--danger-600); color: #fff; }
.btn--danger:hover { background: var(--danger-700); }

.btn--sm { --btn-h: 36px; padding: 0 var(--sp-4); font-size: var(--fs-sm); }
.btn--lg { --btn-h: 52px; padding: 0 var(--sp-6); font-size: var(--fs-md); }
.btn--block { width: 100%; }

/* ---------------- 卡片 / 面板 ---------------- */
.card {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm); overflow: hidden;
}
.card__head { padding: var(--sp-5) var(--sp-6); border-bottom: 1px solid var(--border-subtle); display: flex; align-items: flex-start; gap: var(--sp-4); }
.card__body { padding: var(--sp-6); }
.card__foot { padding: var(--sp-4) var(--sp-6); border-top: 1px solid var(--border-subtle); background: var(--bg-subtle); }
.card__title { font-size: var(--fs-lg); font-weight: var(--fw-semibold); }
.card__desc { font-size: var(--fs-sm); color: var(--text-tertiary); margin-top: 2px; }
.card--interactive { transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out); }
.card--interactive:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--brand-200); }

/* ---------------- 标记 / 徽章 ---------------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--r-full);
  font-size: var(--fs-xs); font-weight: var(--fw-medium);
  background: var(--bg-subtle); color: var(--text-secondary); border: 1px solid var(--border-subtle);
}
.tag--brand   { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-200); }
.tag--success { background: var(--success-50); color: var(--success-700); border-color: var(--success-100); }
.tag--warning { background: var(--warning-50); color: var(--warning-700); border-color: var(--warning-100); }
.tag--danger  { background: var(--danger-50); color: var(--danger-700); border-color: var(--danger-100); }
.tag--info    { background: var(--info-50); color: var(--info-700); border-color: var(--info-50); }
.tag--accent  { background: var(--accent-50); color: var(--accent-700); border-color: var(--accent-100); }

/* ---------------- 提示条 ---------------- */
.notice {
  display: flex; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md); border: 1px solid var(--border-subtle);
  background: var(--bg-subtle); font-size: var(--fs-sm); line-height: var(--lh-snug);
  color: var(--text-secondary);
}
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.notice b { color: var(--text-primary); }
.notice--info    { background: var(--info-50);    border-color: var(--info-50); }
.notice--info svg { color: var(--info-700); }
.notice--success { background: var(--success-50); border-color: var(--success-100); }
.notice--success svg { color: var(--success-700); }
.notice--warning { background: var(--warning-50); border-color: var(--warning-100); }
.notice--warning svg { color: var(--warning-700); }
.notice--danger  { background: var(--danger-50);  border-color: var(--danger-100); }
.notice--danger svg { color: var(--danger-700); }
.notice--compliance {
  background: linear-gradient(120deg, var(--warning-50), var(--accent-50));
  border-color: var(--warning-100);
}

/* ---------------- 表单 ---------------- */
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field > label { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-secondary); }
.field .req { color: var(--danger-600); }
.field__hint { font-size: var(--fs-xs); color: var(--text-tertiary); line-height: var(--lh-snug); }
.field__error { font-size: var(--fs-xs); color: var(--danger-700); font-weight: var(--fw-medium); }
.field-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.input, .select, .textarea {
  min-height: 44px; padding: 10px var(--sp-4);
  background: var(--bg-surface); color: var(--text-primary);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  font-size: var(--fs-base); width: 100%;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.input::placeholder, .textarea::placeholder { color: var(--n-400); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--n-400); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand-600); box-shadow: var(--sh-focus);
}
.input[aria-invalid="true"] { border-color: var(--danger-600); }
.textarea { min-height: 110px; resize: vertical; line-height: var(--lh-snug); padding-top: var(--sp-3); }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235F6B85' stroke-width='2.2' stroke-linecap='round'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 38px; }

/* 勾选行：承载"确认/同意"这类有法律意义的动作，视觉上必须够醒目 */
.check-line {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-4); border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--bg-surface);
  cursor: pointer; transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.check-line:hover { border-color: var(--brand-300); background: var(--brand-50); }
.check-line input[type="checkbox"] {
  appearance: none; width: 22px; height: 22px; flex: none; margin: 1px 0 0;
  border: 1.5px solid var(--border-strong); border-radius: var(--r-xs);
  background: var(--bg-surface); cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.check-line input[type="checkbox"]:checked {
  background: var(--brand-600) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / 14px no-repeat;
  border-color: var(--brand-600);
}
.check-line--guardian { border-color: var(--warning-600); background: var(--warning-50); }
.check-line--guardian:hover { border-color: var(--warning-700); background: var(--warning-100); }
.check-line--guardian input[type="checkbox"]:checked {
  background-color: var(--warning-600);
  border-color: var(--warning-600);
}
.check-line__text { font-size: var(--fs-sm); line-height: var(--lh-snug); color: var(--text-secondary); }
.check-line__text b { color: var(--text-primary); }

/* 分段选择器（注册页选角色用） */
.segmented { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--sp-2); }
.segmented__item {
  min-height: 64px; padding: var(--sp-3); border-radius: var(--r-md);
  border: 1.5px solid var(--border-subtle); background: var(--bg-surface);
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start; justify-content: center;
  cursor: pointer; text-align: left;
  transition: all var(--dur-fast) var(--ease-out);
}
.segmented__item:hover { border-color: var(--brand-300); background: var(--brand-50); }
.segmented__item[aria-pressed="true"] { border-color: var(--brand-600); background: var(--brand-50); box-shadow: var(--sh-xs); }
.segmented__label { font-size: var(--fs-base); font-weight: var(--fw-semibold); color: var(--text-primary); }
.segmented__desc { font-size: var(--fs-xs); color: var(--text-tertiary); line-height: 1.35; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border-subtle); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); background: var(--bg-surface); }
table.data th {
  text-align: left; padding: var(--sp-3) var(--sp-4); white-space: nowrap;
  background: var(--bg-subtle); color: var(--text-secondary);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); letter-spacing: .02em;
  border-bottom: 1px solid var(--border-subtle);
}
table.data td { padding: var(--sp-4); border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--brand-50); }
.ellipsis { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.empty { text-align: center; padding: var(--sp-12) var(--sp-5); color: var(--text-tertiary); }
.empty__title { font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--text-secondary); margin-bottom: var(--sp-1); }

/* ---------------- KPI ---------------- */
.kpi { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5); }
.kpi__label { font-size: var(--fs-xs); color: var(--text-tertiary); font-weight: var(--fw-medium); }
.kpi__value { font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi__meta { font-size: var(--fs-xs); color: var(--text-tertiary); margin-top: 2px; }
.kpi--brand   { border-left: 3px solid var(--brand-600); }
.kpi--success { border-left: 3px solid var(--success-600); }
.kpi--warning { border-left: 3px solid var(--warning-600); }
.kpi--danger  { border-left: 3px solid var(--danger-600); }
.kpi--accent  { border-left: 3px solid var(--accent-500); }

/* ---------------- 弹窗 ---------------- */
.overlay {
  position: fixed; inset: 0; z-index: 60; display: none;
  background: rgba(16, 22, 37, .5); backdrop-filter: blur(3px);
  padding: var(--sp-5); overflow-y: auto;
}
.overlay.is-open { display: flex; align-items: flex-start; justify-content: center; }
.modal {
  width: 100%; max-width: 620px; margin: auto;
  background: var(--bg-raised); border-radius: var(--r-lg); box-shadow: var(--sh-lg);
  border: 1px solid var(--border-subtle);
  animation: modal-in var(--dur-base) var(--ease-out);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.modal--wide { max-width: 880px; }
.modal__head { padding: var(--sp-5) var(--sp-6); border-bottom: 1px solid var(--border-subtle); }
.modal__title { font-size: var(--fs-lg); font-weight: var(--fw-semibold); }
.modal__body { padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-5); max-height: 66vh; overflow-y: auto; }
.modal__foot { padding: var(--sp-4) var(--sp-6); border-top: 1px solid var(--border-subtle); display: flex; justify-content: flex-end; gap: var(--sp-3); background: var(--bg-subtle); border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* ---------------- 轻提示 ---------------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: var(--sp-6); z-index: 80; display: flex; flex-direction: column; gap: var(--sp-2); align-items: center; pointer-events: none; }
.toast {
  background: var(--n-900); color: var(--n-0); padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-full); font-size: var(--fs-sm); font-weight: var(--fw-medium);
  box-shadow: var(--sh-lg); animation: toast-in var(--dur-base) var(--ease-out);
  max-width: 90vw;
}
[data-theme="dark"] .toast { background: var(--n-100); color: var(--text-primary); border: 1px solid var(--border-strong); }
.toast--success { background: var(--success-700); color: #fff; }
.toast--error   { background: var(--danger-700); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   落地页
   ========================================================================== */
.hero { padding: var(--sp-20) 0 var(--sp-16); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 70%;
  background: radial-gradient(60% 60% at 30% 20%, rgba(108, 92, 231, .16), transparent 70%),
              radial-gradient(50% 50% at 80% 10%, rgba(255, 122, 69, .13), transparent 70%);
  pointer-events: none;
}
.hero__inner { position: relative; max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-5); }
.hero__badge { display: inline-flex; align-items: center; gap: var(--sp-2); padding: 6px 14px; border-radius: var(--r-full); background: var(--bg-surface); border: 1px solid var(--border-subtle); font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text-secondary); box-shadow: var(--sh-xs); }
.hero__badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--success-600); display: block; }
.hero__title { font-size: var(--fs-4xl); font-weight: var(--fw-bold); letter-spacing: -.03em; margin-top: var(--sp-6); max-width: 20ch; }
.hero__title em { font-style: normal; background: linear-gradient(120deg, var(--brand-600), var(--accent-500)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { font-size: var(--fs-lg); color: var(--text-secondary); margin-top: var(--sp-5); max-width: 60ch; }
.hero__actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-8); flex-wrap: wrap; }

.section { padding: var(--sp-16) 0; }
.section--tight { padding: var(--sp-10) 0; }
.section__head { max-width: 62ch; margin-bottom: var(--sp-8); }
.section__eyebrow { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .1em; text-transform: uppercase; color: var(--brand-700); }
.section__title { font-size: var(--fs-3xl); font-weight: var(--fw-bold); letter-spacing: -.025em; margin-top: var(--sp-2); }
.section__lead { color: var(--text-secondary); margin-top: var(--sp-3); }

.role-card { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-5); }
.role-card__icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 20px; background: var(--brand-50); color: var(--brand-700); flex: none;
}
.role-card__icon--demand { background: var(--accent-50); color: var(--accent-700); }
.role-card__name { font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.role-card__desc { font-size: var(--fs-sm); color: var(--text-secondary); line-height: var(--lh-snug); }
.role-card__list { margin: 0; padding-left: 1.1em; font-size: var(--fs-sm); color: var(--text-secondary); line-height: var(--lh-snug); }
.role-card__list li + li { margin-top: 3px; }

.flow { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); counter-reset: step; }
.flow__step { position: relative; padding: var(--sp-5); border-radius: var(--r-md); background: var(--bg-surface); border: 1px solid var(--border-subtle); }
.flow__step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: var(--fw-bold);
  color: var(--brand-700);
}
.flow__title { font-size: var(--fs-base); font-weight: var(--fw-semibold); margin-top: var(--sp-2); }
.flow__desc { font-size: var(--fs-sm); color: var(--text-secondary); margin-top: var(--sp-1); line-height: var(--lh-snug); }
.flow__gate { font-size: var(--fs-xs); color: var(--warning-700); margin-top: var(--sp-2); font-weight: var(--fw-medium); }

.footer { border-top: 1px solid var(--border-subtle); padding: var(--sp-10) 0; margin-top: var(--sp-16); background: var(--bg-surface); }
.footer__grid { display: grid; gap: var(--sp-8); grid-template-columns: 1.4fr 1fr 1fr; }
.footer__title { font-size: var(--fs-sm); font-weight: var(--fw-semibold); margin-bottom: var(--sp-3); }
.footer__link { display: block; font-size: var(--fs-sm); color: var(--text-secondary); padding: 5px 0; }
.footer__note { font-size: var(--fs-xs); color: var(--text-tertiary); margin-top: var(--sp-6); line-height: var(--lh-snug); }

/* ==========================================================================
   登录 / 注册
   ========================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth__aside { background: linear-gradient(150deg, var(--brand-700), var(--brand-800) 55%, #2A1D6E); color: #fff; padding: var(--sp-12) var(--sp-10); display: flex; flex-direction: column; gap: var(--sp-6); position: relative; overflow: hidden; }
.auth__aside::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 122, 69, .35), transparent 65%); }
.auth__aside h2 { color: #fff; font-size: var(--fs-2xl); letter-spacing: -.02em; }
.auth__aside p { color: rgba(255, 255, 255, .82); font-size: var(--fs-sm); }
.auth__points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); position: relative; z-index: 1; }
.auth__points li { display: flex; gap: var(--sp-3); font-size: var(--fs-sm); color: rgba(255, 255, 255, .9); line-height: var(--lh-snug); }
.auth__points svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: #8FE3BC; }
.auth__main { display: flex; align-items: center; justify-content: center; padding: var(--sp-10) var(--sp-5); background: var(--bg-page); }
.auth__card { width: 100%; max-width: 460px; }
.auth__tabs { display: flex; gap: var(--sp-1); padding: 4px; background: var(--bg-subtle); border-radius: var(--r-sm); margin-bottom: var(--sp-6); }
.auth__tab { flex: 1; min-height: 40px; border: 0; background: transparent; border-radius: var(--r-xs); cursor: pointer; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-secondary); }
.auth__tab[aria-selected="true"] { background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--sh-xs); }

/* 演示账号卡（仅演示环境） */
.demo-list { display: grid; gap: var(--sp-2); }
.demo-item {
  display: flex; align-items: center; gap: var(--sp-3); width: 100%; text-align: left;
  padding: var(--sp-3) var(--sp-4); min-height: 48px; border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle); background: var(--bg-surface); cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.demo-item:hover { border-color: var(--brand-300); background: var(--brand-50); }
.demo-item__role { flex: none; }
.demo-item__text { font-size: var(--fs-xs); color: var(--text-tertiary); }

/* ==========================================================================
   工作台
   ========================================================================== */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.app__body { flex: 1; display: grid; grid-template-columns: 232px 1fr; align-items: start; max-width: 1400px; margin: 0 auto; width: 100%; padding: var(--sp-6) var(--sp-5) var(--sp-16); gap: var(--sp-6); }

.sidebar { position: sticky; top: calc(var(--header-h) + var(--sp-6)); display: flex; flex-direction: column; gap: var(--sp-5); }
.sidebar__group { display: flex; flex-direction: column; gap: 2px; }
.sidebar__label { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .08em; text-transform: uppercase; color: var(--text-tertiary); padding: 0 var(--sp-3) var(--sp-2); }
.side-item {
  display: flex; align-items: center; gap: var(--sp-3); min-height: 44px; padding: 0 var(--sp-3);
  border-radius: var(--r-sm); border: 0; background: transparent; cursor: pointer; width: 100%;
  font-size: var(--fs-base); font-weight: var(--fw-medium); color: var(--text-secondary); text-align: left;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.side-item:hover { background: var(--bg-subtle); color: var(--text-primary); }
.side-item[aria-current="page"] { background: var(--brand-50); color: var(--brand-700); font-weight: var(--fw-semibold); }
.side-item svg { width: 18px; height: 18px; flex: none; }
.side-item__count { margin-left: auto; font-size: var(--fs-xs); font-weight: var(--fw-semibold); background: var(--danger-600); color: #fff; border-radius: var(--r-full); padding: 1px 7px; min-width: 20px; text-align: center; }

.profile { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); border-radius: var(--r-md); background: var(--bg-subtle); }
.profile__avatar { width: 38px; height: 38px; border-radius: var(--r-sm); display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-600), var(--brand-700)); color: #fff; font-weight: var(--fw-bold); flex: none; }
.profile__name { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.profile__meta { font-size: var(--fs-xs); color: var(--text-tertiary); }

.main { min-width: 0; display: flex; flex-direction: column; gap: var(--sp-5); }
.view { display: none; flex-direction: column; gap: var(--sp-5); }
.view.is-active { display: flex; }
.view__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.view__title { font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: -.02em; }
.view__desc { font-size: var(--fs-sm); color: var(--text-tertiary); margin-top: var(--sp-1); max-width: 70ch; }

/* 闸门横幅：把"你能做什么 / 被什么挡住了"直接摆在最上面 */
.gate-bar { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-radius: var(--r-md); font-size: var(--fs-sm); line-height: var(--lh-snug); border: 1px solid; }
.gate-bar svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.gate-bar--ok { background: var(--success-50); border-color: var(--success-100); color: var(--success-700); }
.gate-bar--limited { background: var(--warning-50); border-color: var(--warning-100); color: var(--warning-700); }
.gate-bar--blocked { background: var(--danger-50); border-color: var(--danger-100); color: var(--danger-700); }
.gate-bar b { color: inherit; font-weight: var(--fw-bold); }
.gate-bar__list { margin: var(--sp-2) 0 0; padding-left: 1.15em; }

/* 任务卡 */
.task-card { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-5); }
.task-card__top { display: flex; align-items: flex-start; gap: var(--sp-3); }
.task-card__title { font-size: var(--fs-md); font-weight: var(--fw-semibold); line-height: var(--lh-snug); }
.task-card__owner { font-size: var(--fs-xs); color: var(--text-tertiary); margin-top: 2px; }
.task-card__brief { font-size: var(--fs-sm); color: var(--text-secondary); line-height: var(--lh-snug); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.task-card__meta { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.task-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--border-subtle); }
.task-card__reward { font-size: var(--fs-lg); font-weight: var(--fw-bold); color: var(--accent-700); }
.task-card__reward small { font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text-tertiary); display: block; }

/* 折叠区（合规条款等长文本） */
details.fold { border: 1px solid var(--border-subtle); border-radius: var(--r-md); background: var(--bg-surface); overflow: hidden; }
details.fold > summary {
  min-height: 48px; padding: var(--sp-3) var(--sp-5); cursor: pointer; list-style: none;
  font-size: var(--fs-sm); font-weight: var(--fw-semibold); display: flex; align-items: center; gap: var(--sp-2);
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "▸"; color: var(--brand-700); font-size: 12px; transition: transform var(--dur-fast) var(--ease-out); }
details.fold[open] > summary::before { transform: rotate(90deg); }
details.fold > .fold__body { padding: 0 var(--sp-5) var(--sp-5); font-size: var(--fs-sm); color: var(--text-secondary); line-height: var(--lh-snug); }

/* 空状态 */
.skeleton { background: linear-gradient(90deg, var(--bg-subtle), var(--n-100), var(--bg-subtle)); background-size: 200% 100%; animation: sk 1.4s ease-in-out infinite; border-radius: var(--r-sm); }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1024px) {
  .auth { grid-template-columns: 1fr; }
  .auth__aside { display: none; }
  .app__body { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .sidebar__group { flex-direction: row; overflow-x: auto; gap: var(--sp-2); padding-bottom: var(--sp-2); }
  .sidebar__label { display: none; }
  .side-item { white-space: nowrap; width: auto; padding: 0 var(--sp-4); }
  .side-item__count { margin-left: var(--sp-2); }
  .footer__grid { grid-template-columns: 1fr; gap: var(--sp-6); }
}

@media (max-width: 768px) {
  :root { --fs-4xl: 32px; --fs-3xl: 26px; --fs-2xl: 22px; }
  .hero { padding: var(--sp-12) 0 var(--sp-10); }
  .section { padding: var(--sp-10) 0; }
  .header__inner { gap: var(--sp-3); padding: 0 var(--sp-4); }
  .brand__sub { display: none; }
  .nav__item span:not(.nav__item-keep) { display: none; }
  .card__body, .modal__body { padding: var(--sp-5); }
  .app__body { padding: var(--sp-4) var(--sp-4) var(--sp-12); }
  .modal__foot { flex-direction: column-reverse; }
  .modal__foot .btn { width: 100%; }
}
