/* ResearchMix 设计系统 · Apple 风格 */
:root {
  --bg: #f5f5f7; --card: #ffffff; --ink: #1d1d1f; --ink2: #6e6e73; --ink3: #86868b;
  --line: #d2d2d7; --blue: #0071e3; --blue-h: #0077ed; --red: #ff3b30; --green: #0a7d45;
  --radius: 14px; --radius-lg: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: var(--bg); color: var(--ink); min-height: 100vh;
  display: flex; flex-direction: column;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 导航 */
.nav { max-width: 1080px; width: 100%; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav .logo { font-size: 17px; font-weight: 600; letter-spacing: .3px; color: var(--ink); }
.nav .logo:hover { text-decoration: none; }
.nav .links { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav .links a { color: var(--ink2); font-size: 14px; padding: 6px 12px; border-radius: 980px; }
.nav .links a:hover { background: rgba(0,0,0,.05); text-decoration: none; }
.nav .links a.active { color: var(--blue); font-weight: 600; }
.nav .links a.btn { color: #fff; background: var(--blue); font-weight: 600; }
.nav .links a.btn:hover { background: var(--blue-h); }

/* 布局 */
.wrap { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 28px 20px 48px; }
.card { background: var(--card); border-radius: var(--radius-lg); padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04); }
.hero { text-align: center; padding: 64px 20px 40px; }
.hero h1 { font-size: 44px; font-weight: 700; letter-spacing: -.4px; margin-bottom: 12px; }
.hero p { font-size: 18px; color: var(--ink2); line-height: 1.7; max-width: 640px; margin: 0 auto 28px; }
h2 { font-size: 24px; font-weight: 700; letter-spacing: -.2px; margin-bottom: 6px; }
.sub { font-size: 14px; color: var(--ink3); margin-bottom: 22px; line-height: 1.6; }

/* 表单 */
.field { margin-bottom: 16px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 10px;
  padding: 0 14px; font-size: 15px; color: var(--ink); outline: none; background: #fff;
  font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 96px; padding: 10px 14px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,113,227,.15);
}
input::placeholder, textarea::placeholder { color: #aeaeb2; }
input.code { text-align: center; font-size: 24px; font-weight: 600; letter-spacing: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); }
.check span { font-size: 13px; color: var(--ink2); line-height: 1.7; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border: none; border-radius: 980px; cursor: pointer;
  background: var(--blue); color: #fff; font-size: 16px; font-weight: 600;
  font-family: inherit; transition: background .15s, opacity .15s; }
.btn:hover { background: var(--blue-h); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--blue); }
.btn.ghost:hover { background: rgba(0,113,227,.08); }
.btn.gray { background: #e8e8ed; color: var(--ink); }
.btn.gray:hover { background: #dcdce2; }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.danger { background: var(--red); }
.btn.block { width: 100%; }

/* 表格 */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink3);
  border-bottom: 1px solid var(--line); padding: 10px 12px; }
td { border-bottom: 1px solid #f0f0f2; padding: 12px; color: var(--ink);
  vertical-align: middle; word-break: break-word; }
tr:hover td { background: #fafafc; }

/* 徽章 */
.badge { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px;
  padding: 3px 10px; }
.badge.ok { background: #e6f7ee; color: var(--green); }
.badge.warn { background: #fff4e0; color: #b26a00; }
.badge.bad { background: #ffecec; color: var(--red); }
.badge.gray { background: #f2f2f5; color: var(--ink3); }
.badge.blue { background: #e8f2fd; color: var(--blue); }

/* 提示 */
.msg { min-height: 18px; font-size: 13px; margin-top: 10px; color: var(--red); }
.msg.ok { color: var(--green); }
.hint { display: flex; gap: 8px; align-items: flex-start; background: #f2f7fd;
  border: 1px solid #dbeafe; border-radius: 10px; padding: 12px 14px;
  font-size: 13px; color: var(--ink2); line-height: 1.7; margin: 14px 0; }
.hint b { color: var(--ink); }

/* Toast */
#toast-box { position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 1000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: rgba(29,29,31,.92); color: #fff; font-size: 14px;
  padding: 10px 20px; border-radius: 980px; box-shadow: 0 6px 24px rgba(0,0,0,.2);
  animation: toast-in .25s ease; max-width: 86vw; }
.toast.err { background: rgba(255,59,48,.95); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* Modal */
#modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 900;
  display: none; align-items: center; justify-content: center; padding: 20px; }
#modal-mask.show { display: flex; }
#modal { background: #fff; border-radius: var(--radius-lg); max-width: 560px;
  width: 100%; padding: 32px; max-height: 84vh; overflow: auto; }

/* 公告 */
#notice-bar { display: none; background: #1d1d1f; color: #f5f5f7; font-size: 14px;
  padding: 10px 44px 10px 20px; position: relative; }
#notice-bar .close { position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #a1a1a6; font-size: 18px; cursor: pointer; }

/* 维护页 */
.maint { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.maint .box { text-align: center; max-width: 440px; }
.maint .icon { font-size: 44px; margin-bottom: 18px; }
.maint h1 { font-size: 28px; margin-bottom: 10px; }
.maint p { color: var(--ink2); font-size: 15px; line-height: 1.8; }

/* 预览防复制 */
.nocopy { -webkit-user-select: none; user-select: none; }
.nocopy::selection { background: transparent; }

.foot { text-align: center; padding: 24px; font-size: 12px; color: var(--ink3);
  line-height: 1.7; }
.foot a { color: var(--ink3); }

/* 响应式 */
@media (max-width: 720px) {
  .hero h1 { font-size: 32px; }
  .row2 { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  table { font-size: 13px; }
  td, th { padding: 8px; }
}
