/* 清华长庚教职工心理关怀 · 首页（对齐 Doc/1.pen） */

html:has(.sw-home),
html:has(.sw-home) body {
  height: auto;
  min-height: 100%;
  overflow: auto;
  background: #f5f3ee;
}

html:has(.sw-home) body > div,
html:has(.sw-home) .min-h-dvh.overflow-hidden {
  height: auto !important;
  min-height: 100dvh;
  overflow: visible !important;
}

html:has(.sw-home) main {
  display: block !important;
  height: auto !important;
  min-height: 100dvh;
  overflow: visible !important;
}

html:has(.sw-home) main > section {
  display: block !important;
  padding: 0 !important;
}

.sw-home {
  --sw-surface: #f5f3ee;
  --sw-surface-2: #c8dbbc;
  --sw-card: #ffffff;
  --sw-text: #1b3a28;
  --sw-text-2: #4a6b52;
  --sw-muted: #7a9a80;
  --sw-border: #d6ddd0;
  --sw-accent: #2d5e3a;
  --sw-on-accent: #ffffff;
  --sw-track: #e9e6de;
  --sw-heading: "Playfair Display", "Noto Serif SC", serif;
  --sw-script: "Ma Shan Zheng", cursive;
  --sw-body: "Geist", "Inter", ui-sans-serif, system-ui, sans-serif;
  --sw-caption: "Inter", ui-sans-serif, system-ui, sans-serif;
  --sw-shadow: 0 1px 2px #0000000a;

  box-sizing: border-box;
  width: 100%;
  min-height: 100dvh;
  background: var(--sw-surface);
  color: var(--sw-text);
  font-family: var(--sw-body);
}

.sw-home *,
.sw-home *::before,
.sw-home *::after {
  box-sizing: border-box;
}

.sw-home a {
  text-decoration: none;
}

.sw-home [id] {
  scroll-margin-top: 24px;
}

.sw-home__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 20px 0;
}

@media (min-width: 768px) {
  .sw-home__inner {
    padding: 28px 24px 0;
  }
}

/* —— 导航 —— */
.sw-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  padding: 10px 8px 10px 18px;
  background: var(--sw-card);
  border: 1px solid var(--sw-border);
  border-radius: 9999px;
}

@media (min-width: 960px) {
  .sw-nav {
    width: fit-content;
    gap: 40px;
    padding: 10px 12px 10px 24px;
  }
}

.sw-nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
  color: var(--sw-text);
}

.sw-nav__dot {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 9999px;
  background: var(--sw-accent);
}

.sw-nav__name {
  overflow: hidden;
  color: var(--sw-text);
  font-family: var(--sw-caption);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 960px) {
  .sw-nav__name {
    font-size: 14px;
  }
}

.sw-nav__links {
  display: none;
  align-items: center;
  gap: 28px;
}

.sw-nav__link {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  color: var(--sw-muted);
  font-family: var(--sw-caption);
  font-size: 14px;
  transition: color 0.15s ease;
}

.sw-nav__links .sw-nav__link:hover {
  color: var(--sw-text);
}

.sw-nav__cta {
  display: none;
  flex-shrink: 0;
  padding: 9px 20px;
  background: var(--sw-accent);
  color: var(--sw-on-accent);
  border-radius: 9999px;
  font-family: var(--sw-caption);
  font-size: 14px;
  font-weight: 600;
}

a.sw-nav__cta,
a.sw-nav__cta:hover,
a.sw-nav__cta:visited {
  color: var(--sw-on-accent);
}

.sw-nav__cta:hover {
  filter: brightness(1.08);
}

.sw-nav__menu {
  position: relative;
  flex-shrink: 0;
  margin-left: auto;
}

.sw-nav__menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9999px;
  background: var(--sw-surface);
  color: var(--sw-text);
  cursor: pointer;
  list-style: none;
}

.sw-nav__menu-btn::-webkit-details-marker {
  display: none;
}

.sw-nav__menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 168px;
  padding: 10px;
  background: var(--sw-card);
  border: 1px solid var(--sw-border);
  border-radius: 12px;
  box-shadow: var(--sw-shadow);
}

.sw-nav__menu-panel .sw-nav__link {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--sw-text-2);
}

.sw-nav__menu-panel .sw-nav__link:hover {
  background: var(--sw-surface);
  color: var(--sw-text-2);
}

.sw-nav__menu-panel a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--sw-text-2);
  font-family: var(--sw-caption);
  font-size: 14px;
}

.sw-nav__menu-panel a:hover {
  background: var(--sw-surface);
}

.sw-nav__menu-panel a.is-primary,
.sw-nav__menu-panel a.is-primary:visited {
  background: var(--sw-accent);
  color: var(--sw-on-accent);
  font-weight: 600;
  text-align: center;
}

@media (min-width: 960px) {
  .sw-nav__links,
  .sw-nav__cta {
    display: flex;
  }

  .sw-nav__menu {
    display: none;
  }
}

/* —— 主视觉 —— */
.sw-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: min(720px, 100%);
  padding: 48px 0 0;
  text-align: center;
}

@media (min-width: 768px) {
  .sw-hero {
    gap: 28px;
    padding-top: 88px;
  }
}

.sw-pill {
  padding: 8px 18px;
  background: var(--sw-surface-2);
  border-radius: 9999px;
  color: var(--sw-text);
  font-family: var(--sw-caption);
  font-size: 13px;
}

.sw-hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0;
  color: var(--sw-text);
  font-family: var(--sw-heading);
  font-size: clamp(36px, 6vw, 58px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.sw-hero__line {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0 8px;
  white-space: nowrap;
}

.sw-hero__script {
  display: inline-flex;
  align-items: center;
  color: var(--sw-accent);
  font-family: var(--sw-script);
  font-size: clamp(44px, 7vw, 68px);
  font-weight: 400;
  line-height: 1;
  transform: translateY(0.12em);
}

.sw-hero__lead {
  max-width: 640px;
  margin: 0;
  color: var(--sw-text-2);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .sw-hero__lead {
    font-size: 17px;
  }
}

.sw-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
}

.sw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 15px 34px;
  border: none;
  border-radius: 9999px;
  background: var(--sw-accent);
  color: var(--sw-on-accent);
  font-family: var(--sw-caption);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

a.sw-btn,
a.sw-btn:hover,
a.sw-btn:visited,
button.sw-btn {
  color: var(--sw-on-accent);
}

.sw-btn:hover {
  filter: brightness(1.08);
}

.sw-btn--ghost {
  background: transparent;
  padding: 8px 0;
  font-weight: 500;
}

a.sw-btn--ghost,
a.sw-btn--ghost:visited,
button.sw-btn--ghost {
  color: var(--sw-text-2);
}

a.sw-btn--ghost:hover,
button.sw-btn--ghost:hover {
  filter: none;
  color: var(--sw-accent);
}

.sw-hero__note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 7px 16px;
  border: 1px solid var(--sw-border);
  border-radius: 9999px;
  color: var(--sw-muted);
  font-family: var(--sw-caption);
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}

.sw-hero__note svg {
  flex-shrink: 0;
  color: var(--sw-accent);
}

/* —— 双栏展示 —— */
.sw-show {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  width: min(1060px, 100%);
  padding-top: 56px;
  overflow: visible;
}

@media (min-width: 900px) {
  .sw-show {
    grid-template-columns: 1fr 1fr;
    padding-top: 88px;
  }
}

.sw-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  overflow: visible;
  background: var(--sw-card);
  border-radius: 12px;
  box-shadow: var(--sw-shadow);
}

@media (min-width: 768px) {
  .sw-card {
    gap: 20px;
    padding: 28px;
  }
}

.sw-preview__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--sw-muted);
  font-family: var(--sw-caption);
  font-size: 13px;
}

.sw-preview__top strong {
  font-weight: 600;
}

.sw-progress {
  overflow: hidden;
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: var(--sw-track);
}

.sw-progress__bar {
  width: 26.087%;
  height: 100%;
  border-radius: 9999px;
  background: var(--sw-accent);
}

.sw-preview__q {
  margin: 0;
  color: var(--sw-text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}

.sw-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sw-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--sw-border);
  border-radius: 8px;
  color: var(--sw-text);
  font-size: 15px;
}

.sw-option.is-on {
  background: var(--sw-surface-2);
  border-color: var(--sw-accent);
}

.sw-radio {
  position: relative;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--sw-muted);
  border-radius: 9999px;
}

.sw-option.is-on .sw-radio {
  border-color: var(--sw-accent);
}

.sw-option.is-on .sw-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 9999px;
  background: var(--sw-accent);
}

.sw-preview__hint {
  margin: 0;
  color: var(--sw-muted);
  font-family: var(--sw-caption);
  font-size: 12px;
}

.sw-privacy__kicker {
  margin: 0;
  color: var(--sw-muted);
  font-family: var(--sw-caption);
  font-size: 13px;
  font-weight: 600;
}

.sw-privacy__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.sw-privacy__list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sw-privacy__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.sw-privacy__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--sw-surface);
  color: var(--sw-accent);
}

.sw-privacy__item h3 {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 600;
}

.sw-privacy__item p {
  margin: 0;
  color: var(--sw-text-2);
  font-family: var(--sw-caption);
  font-size: 13px;
  line-height: 1.5;
}

.sw-float {
  position: absolute;
  top: -28px;
  right: 12px;
  z-index: 2;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--sw-card);
  border: 1px solid var(--sw-border);
  border-radius: 8px;
  box-shadow: var(--sw-shadow);
  transform: rotate(-4deg);
  color: var(--sw-accent);
}

@media (min-width: 900px) {
  .sw-float {
    display: flex;
  }
}

.sw-float strong {
  display: block;
  color: var(--sw-text);
  font-family: var(--sw-caption);
  font-size: 13px;
  font-weight: 600;
}

.sw-float span {
  color: var(--sw-muted);
  font-family: var(--sw-caption);
  font-size: 11px;
}

/* —— 模块磁贴 —— */
.sw-modules {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(1120px, 100%);
  padding: 56px 0 0;
}

@media (min-width: 768px) {
  .sw-modules {
    gap: 14px;
    padding-top: 96px;
  }
}

.sw-modules__title {
  margin: 0;
  font-family: var(--sw-heading);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  text-align: center;
}

.sw-modules__lead {
  margin: 0;
  color: var(--sw-muted);
  font-family: var(--sw-caption);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

@media (min-width: 768px) {
  .sw-modules__lead {
    font-size: 14px;
  }
}

.sw-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  padding-top: 14px;
}

@media (min-width: 900px) {
  .sw-tiles {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 12px;
    padding-top: 24px;
  }
}

.sw-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  border: 1px solid var(--sw-border);
  border-radius: 8px;
  text-align: center;
}

@media (min-width: 900px) {
  .sw-tile {
    padding: 22px 8px;
  }
}

.sw-tile__index {
  font-family: var(--sw-heading);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

@media (min-width: 900px) {
  .sw-tile__index {
    font-size: 26px;
  }
}

.sw-tile__name {
  color: var(--sw-muted);
  font-family: var(--sw-caption);
  font-size: 12px;
  line-height: 1.4;
}

@media (min-width: 900px) {
  .sw-tile__name {
    font-size: 13px;
  }
}

/* —— 页脚 —— */
.sw-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(920px, 100%);
  padding: 56px 0 40px;
  text-align: center;
}

@media (min-width: 768px) {
  .sw-foot {
    padding: 80px 0 48px;
  }
}

.sw-foot p {
  margin: 0;
  font-family: var(--sw-caption);
  line-height: 1.6;
}

.sw-foot__help {
  color: var(--sw-text-2);
  font-size: 13px;
}

.sw-foot__copy {
  color: var(--sw-muted);
  font-size: 12px;
}

.sw-foot__copy a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sw-foot__copy a:hover {
  color: var(--sw-text);
}
