/* ============================================================================
   基础层 —— 重置、排版基线、全站共用的控件（按钮/输入框/卡片/提示）
   这一层不含任何页面专属布局，那些在 cover.css 与 site.css 里。
   ========================================================================== */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:focus-visible {
  outline: 2px solid var(--haze);
  outline-offset: 3px;
}

/* ---- 站点标识（触发器与页头共用） ---- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 0;
  font-family: var(--font-title);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink);
  background: none;
  border: 0;
  text-decoration: none;
  cursor: pointer;
}
.brand-text {
  padding-bottom: 6px;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.brand:hover .brand-text { border-bottom-color: var(--ochre); }

/* 指示符：一条会转的短横，比三角箭头安静 */
.brand-mark {
  width: 14px;
  height: 1px;
  background: var(--ink-faint);
  transition: transform 240ms var(--ease), background-color 240ms ease;
}
.brand[aria-expanded="true"] .brand-mark {
  transform: rotate(90deg);
  background: var(--ochre);
}

/* ---- 纸卡：全站唯一的面板外观 ---- */
.card {
  border-radius: var(--radius);
  background: rgba(247, 243, 235, 0.93);
  border: 1px solid rgba(216, 207, 186, 0.9);
  box-shadow: 0 10px 40px rgba(43, 43, 40, 0.12);
  position: relative;
}
/* 顶部一道细线：让它读起来是「一张纸卡」而不是「一块色块」 */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 40px;
  right: 40px;
  height: 2px;
  background: var(--accent);
  opacity: 0.55;
  border-radius: 0 0 2px 2px;
}

/* ---- 表单 ---- */
.field { margin-bottom: 20px; }

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  letter-spacing: 0.10em;
  color: var(--ink-sub);
}

.field input {
  width: 100%;
  height: 38px;
  padding: 0 2px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-input);
  border-radius: 0;
  outline: none;
  transition: border-color 180ms ease;
  appearance: none;
}
.field input::placeholder { color: #B3AB98; }
.field input:hover { border-bottom-color: var(--ink-sub); }
.field input:focus { border-bottom-color: var(--haze); }

.hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-faint);
}

/* ---- 按钮 ---- */
.submit {
  width: 100%;
  height: 46px;
  margin-top: 28px;
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0.22em;
  text-indent: 0.22em;          /* 补偿末字后的字距，使文字真正居中 */
  color: #F7F3EB;
  background: var(--olive);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 160ms ease;
}
.submit:hover { background: var(--olive-dark); }
.submit:active { background: var(--olive-deep); }

/* ---- 错误/提示位：始终占位，避免出现时布局跳动 ---- */
.notice {
  min-height: 20px;
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--cinnabar);
}

/* ---- 细分隔线 ---- */
.rule {
  height: 1px;
  margin: 18px 0 24px;
  background: var(--line);
  border: 0;
}

/* ---- 小字标签（登录·SIGN IN 这类） ---- */
.eyebrow {
  margin: 0 0 24px;
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.30em;
  color: var(--ink-faint);
}
.eyebrow .dot { color: var(--accent); }

/* ---- 行内链接 ---- */
.link {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.link:hover { color: var(--haze); border-bottom-color: var(--haze); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important; }
}
