﻿:root {
  --bg: #f3f6f4;
  --card: #ffffff;
  --text: #1f2a24;
  --muted: #5d6b63;
  --line: #d7e0da;
  --accent: #0f766e;
  --accent-dark: #0b5b55;
  --danger: #b42318;
  --ok: #067647;
  --header-h: 60px;
}

* { box-sizing: border-box; }

html {
  scroll-padding-top: 12px;
}

html:has(body:not(.page-apply)) {
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 10% -10%, #d9f3ee 0%, transparent 60%),
    radial-gradient(700px 360px at 100% 0%, #e7efe9 0%, transparent 55%),
    var(--bg);
  min-height: 100vh;
}

.wrap { width: min(960px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(6px);
  position: relative;
  z-index: 10;
}

/* 非申请页：仅桌面使用 sticky，避免手机软键盘滚入时与内容重叠 */
@media (min-width: 768px) {
  body:not(.page-apply) .site-header {
    position: sticky;
    top: 0;
  }
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}

.brand { font-weight: 700; color: var(--text); text-decoration: none; }
nav a { margin-left: 16px; color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--accent); }

.hero { padding: 48px 0 24px; }
.hero h1 { margin: 0 0 12px; font-size: 2rem; }
.hero p { margin: 0 0 20px; color: var(--muted); max-width: 40rem; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font: inherit;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  padding: 8px 0 40px;
}
.cards article, .apply-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(20, 40, 30, .04);
}
.cards h3 { margin-top: 0; }
.cards ul { padding-left: 18px; color: var(--muted); }
code { background: #eef4f1; padding: 1px 6px; border-radius: 6px; }

.apply-panel {
  margin: 20px 0 32px;
  max-width: 480px;
}
@media (min-width: 768px) {
  .apply-panel { margin: 40px 0 48px; }
}

.page-apply .apply-panel {
  margin-top: 24px;
}

.apply-panel .panel-brand {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--text);
}

.apply-panel .panel-subtitle {
  margin: 0 0 8px;
  font-size: .95rem;
  font-weight: 600;
  color: var(--accent);
}

.hint {
  color: var(--muted);
  margin: 0 0 4px;
  font-size: .92rem;
  line-height: 1.5;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 16px 0 8px;
}
.tab {
  flex: 1;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
}
.tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.form label {
  display: block;
  margin: 14px 0 0;
  font-weight: 600;
}
.form label > span {
  display: block;
  margin-bottom: 6px;
}
.form input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 16px; /* 避免 iOS 聚焦自动放大 */
  scroll-margin-top: 16px;
}
.form input:focus {
  outline: 2px solid rgba(15, 118, 110, .35);
  outline-offset: 1px;
  border-color: var(--accent);
}

.tip-slot {
  min-height: 44px;
  margin-top: 8px;
}
.tip, .result {
  white-space: pre-wrap;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .92rem;
  line-height: 1.45;
}
.tip.err, .result.err { background: #fef3f2; color: var(--danger); }
.tip.ok, .result.ok { background: #ecfdf3; color: var(--ok); }

.form .btn.primary {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 600;
}

.result-slot {
  min-height: 0;
  margin-top: 12px;
}

.site-footer {
  color: var(--muted);
  padding: 24px 0 40px;
  font-size: .9rem;
}
