:root {
  color-scheme: light dark;
  --page: #edf1ee;
  --surface: #f8faf8;
  --surface-strong: #ffffff;
  --text: #14221a;
  --muted: #647168;
  --line: #d3ddd6;
  --accent: #1d6546;
  --accent-strong: #144c34;
  --accent-soft: #e0eee6;
  --danger: #a23b34;
  --danger-soft: #f7e8e6;
  --focus: rgba(29, 101, 70, 0.24);
  --shadow: rgba(21, 56, 37, 0.1);
  font-family: "Avenir Next", Avenir, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; }
body { min-height: 100dvh; margin: 0; color: var(--text); background: var(--page); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }

.site-nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 13px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(16px);
}

.wordmark { display: inline-flex; align-items: center; gap: 11px; color: var(--text); font-weight: 760; text-decoration: none; }
.wordmark-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: #f5faf7; background: var(--accent); font-weight: 800; }
.nav-links { display: flex; align-items: center; gap: 5px; }
.nav-links a { border-radius: 10px; padding: 9px 12px; color: var(--muted); font-size: 14px; font-weight: 680; text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--accent-soft); }
.nav-links .primary-link { color: #f5faf7; background: var(--accent); }
.nav-links .primary-link:hover { color: #fff; background: var(--accent-strong); }

.home-hero { min-height: calc(100dvh - 70px); display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(420px, .96fr); background: var(--surface); }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(54px, 8vw, 112px) clamp(28px, 7vw, 104px); }
.hero-copy h1 { max-width: 9ch; margin: 0; font-size: clamp(52px, 7vw, 92px); font-weight: 690; letter-spacing: -.065em; line-height: .98; }
.hero-copy > p { max-width: 34ch; margin: 25px 0 0; color: var(--muted); font-size: clamp(17px, 1.7vw, 21px); line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; color: var(--text); background: var(--surface-strong); font-weight: 720; text-decoration: none; cursor: pointer; }
.button.primary { border-color: var(--accent); color: #f6faf7; background: var(--accent); }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(1px) scale(.99); }
.hero-media { position: relative; min-height: 580px; overflow: hidden; background: #163c29; }
.hero-media img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9,29,18,.08), rgba(8,27,16,.52)); pointer-events: none; }
.hero-note { position: absolute; z-index: 1; left: 34px; right: 34px; bottom: 34px; max-width: 520px; margin: 0; color: rgba(248,251,249,.92); font-size: clamp(22px, 2.3vw, 34px); font-weight: 650; letter-spacing: -.035em; line-height: 1.3; }

.value-section { padding: clamp(70px, 9vw, 120px) clamp(24px, 7vw, 104px); background: var(--page); }
.value-section h2 { max-width: 13ch; margin: 0; font-size: clamp(38px, 5vw, 64px); letter-spacing: -.055em; line-height: 1.06; }
.value-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(36px, 8vw, 120px); margin-top: 54px; }
.value-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.value-item { min-height: 190px; border-radius: 16px; padding: 24px; background: var(--surface-strong); box-shadow: 0 16px 48px var(--shadow); }
.value-item:nth-child(2) { background: var(--accent); color: #f4faf6; }
.value-item h3 { margin: 0; font-size: 22px; }
.value-item p { margin: 14px 0 0; color: var(--muted); line-height: 1.7; }
.value-item:nth-child(2) p { color: rgba(244,250,246,.76); }
.value-intro { align-self: center; color: var(--muted); font-size: 19px; line-height: 1.8; }

.page-shell { width: min(100% - 40px, 1120px); margin: clamp(42px, 6vw, 78px) auto; }
.page-head { max-width: 760px; margin-bottom: 34px; }
.page-head h1 { margin: 0; font-size: clamp(42px, 6vw, 72px); letter-spacing: -.06em; line-height: 1.04; }
.page-head p { max-width: 46ch; margin: 18px 0 0; color: var(--muted); font-size: 17px; line-height: 1.7; }
.panel { border: 1px solid var(--line); border-radius: 16px; padding: clamp(22px, 4vw, 40px); background: var(--surface-strong); box-shadow: 0 18px 54px var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px; }
.field { display: grid; gap: 8px; color: var(--text); font-size: 14px; font-weight: 680; }
.field.full, .form-actions, .status { grid-column: 1 / -1; }
.field input, .field textarea, .field select { width: 100%; min-height: 50px; border: 1px solid #aab9ae; border-radius: 12px; padding: 12px 14px; color: var(--text); background: var(--surface-strong); outline: none; }
.field textarea { min-height: 118px; resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus, .button:focus-visible, .nav-links a:focus-visible { border-color: var(--accent); outline: 3px solid var(--focus); outline-offset: 2px; }
.helper { color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.5; }
.honeypot { position: absolute; left: -9999px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 4px; }
.form-actions p { margin: 0; color: var(--muted); font-size: 13px; }
.status { border-radius: 12px; padding: 13px 15px; background: var(--accent-soft); color: var(--accent-strong); font-size: 14px; font-weight: 650; }
.status[data-tone="error"] { color: var(--danger); background: var(--danger-soft); }

.member-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; }
.member-summary { align-self: start; position: sticky; top: 24px; }
.member-avatar { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 16px; color: var(--accent); background: var(--accent-soft); font-size: 25px; font-weight: 800; }
.member-summary h2 { margin: 20px 0 4px; }
.member-summary p { margin: 0; color: var(--muted); line-height: 1.6; }
.member-meta { display: grid; gap: 12px; margin-top: 24px; }
.member-meta div { display: grid; gap: 3px; }
.member-meta span { color: var(--muted); font-size: 12px; }
.member-meta strong { font-size: 14px; }
.member-reading-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.member-reading-stats a { min-width: 0; border-radius: 10px; padding: 11px 5px; color: var(--text); background: var(--surface); text-align: center; text-decoration: none; }
.member-reading-stats strong { display: block; font-size: 19px; }
.member-reading-stats span { display: block; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.member-reading-stats a:hover { color: var(--accent-strong); background: var(--accent-soft); }
.settings-stack { display: grid; gap: 20px; }
.settings-stack h2 { margin: 0 0 22px; }

.admin-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 22px; }
.admin-card { min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; border-radius: 16px; padding: 28px; color: var(--text); background: var(--surface-strong); text-decoration: none; box-shadow: 0 18px 50px var(--shadow); }
.admin-card.primary { color: #f4faf6; background: var(--accent); }
.admin-card h2 { margin: 0; font-size: 30px; letter-spacing: -.04em; }
.admin-card p { max-width: 33ch; margin: 16px 0 0; color: var(--muted); line-height: 1.7; }
.admin-card.primary p { color: rgba(244,250,246,.76); }
.admin-card strong { align-self: flex-start; margin-top: 32px; font-size: 14px; }

.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 34px clamp(24px, 7vw, 104px); color: var(--muted); background: var(--surface); font-size: 12px; }
.site-footer a { color: inherit; }

@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; }
  .hero-copy { min-height: 520px; }
  .hero-media { min-height: 440px; }
  .value-grid, .member-layout, .admin-grid { grid-template-columns: 1fr; }
  .member-summary { position: static; }
}

@media (max-width: 680px) {
  .site-nav { min-height: 62px; padding-inline: 17px; }
  .nav-links a:not(.primary-link) { display: none; }
  .wordmark span:last-child { font-size: 14px; }
  .hero-copy { min-height: 470px; padding: 52px 24px; }
  .hero-copy h1 { font-size: 54px; }
  .hero-media { min-height: 340px; }
  .value-section { padding-inline: 20px; }
  .value-list, .form-grid { grid-template-columns: 1fr; }
  .field.full, .form-actions, .status { grid-column: auto; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .page-shell { width: min(100% - 28px, 1120px); }
  .site-footer { flex-direction: column; gap: 8px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #101713;
    --surface: #151d18;
    --surface-strong: #1d2821;
    --text: #edf3ef;
    --muted: #a5b1a8;
    --line: #2d3c32;
    --accent: #347d59;
    --accent-strong: #6cb58a;
    --accent-soft: #213a2d;
    --danger: #ef9b94;
    --danger-soft: #3a2422;
    --focus: rgba(108,181,138,.28);
    --shadow: rgba(0,0,0,.28);
  }
  .field input, .field textarea, .field select { border-color: #536359; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
