/* 群享楼 28s2.xyz */

:root {
  --bg: #F4F6F3;
  --surface: #FFFFFF;
  --surface-2: #E8EBE6;
  --ink: #16201C;
  --muted: #5A6159;
  --line: #D6DAD3;
  --accent: #14483C;
  --accent-ink: #FFFFFF;
  --accent-wash: #E3EDE9;
  --gold: #8A5A2B;
  --warn-wash: #F7EFE4;
  --danger: #A8321F;
  --danger-wash: #FBEDEA;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 44px;

  --r1: 2px;
  --r2: 4px;
  --sh1: 0 1px 2px rgba(22, 32, 28, .06);
  --sh2: 0 8px 20px -14px rgba(22, 32, 28, .32);

  --container: 680px;
  --container-wide: 1080px;
  --rail: 250px;

  --ease: cubic-bezier(.22, .68, .3, 1);
  --dur: 150ms;

  --cta-loop: 2.8s;
  --cta-ease: cubic-bezier(.16, .7, .26, 1);
  --cta-bg: #14483C;
  --cta-bg-hover: #0E3B31;
  --cta-seal: #F7EFE4;
  --cta-ink: #7A4E20;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding-bottom: 104px;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

h1, h2, h3 { margin: 0; line-height: 1.35; letter-spacing: 0; }
h1 { font-size: 28px; font-weight: 700; line-height: 1.3; }
h2 { font-size: 21px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; line-height: 1.45; }
p { margin: 0 0 var(--s3); }
ul, ol { margin: 0 0 var(--s3); padding-left: 20px; }
li { margin: 0 0 var(--s1); }
img { max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 2px; }
a:visited { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap { width: 100%; max-width: var(--container-wide); margin: 0 auto; padding: 0 var(--s4); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: var(--s3) var(--s4);
  z-index: 60;
}
.skip:focus { left: var(--s4); top: var(--s2); }

/* 报头 */
.hdr { background: var(--surface); }
.hdr__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s4);
  padding-top: var(--s4);
  padding-bottom: var(--s4);
}
.brand { display: inline-flex; align-items: baseline; text-decoration: none; color: var(--ink); }
.brand__name {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--accent);
}
.brand:hover .brand__name { color: var(--accent); }
.brand__tag { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.hdr__meta { margin-left: auto; }

.quick { position: relative; }
.quick > summary { cursor: pointer; list-style: none; }
.quick > summary::-webkit-details-marker { display: none; }
.quick > summary::after { content: " ▾"; color: var(--muted); }
.quick[open] > summary::after { content: " ▴"; }
.quick__panel {
  position: absolute;
  right: 0;
  top: calc(100% + var(--s2));
  width: min(420px, calc(100vw - 32px));
  max-height: 320px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  box-shadow: var(--sh2);
  padding: var(--s3) var(--s4);
  z-index: 30;
}
.quick__panel ul { columns: 2; margin: 0; padding-left: 18px; }
.quick__panel li { font-size: 14px; }

.nav {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  margin: 0;
  padding-left: var(--s4);
  padding-right: var(--s4);
  list-style: none;
}
.nav li { display: flex; }
.nav li + li { border-left: 1px solid var(--line); }
.nav a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 var(--s4);
  font-size: 15px;
  text-decoration: none;
  color: var(--ink);
}
.nav a:hover { background: var(--accent-wash); color: var(--accent); text-decoration: none; }
@media (min-width: 620px) {
  .nav a { padding: 0 var(--s6); }
}

/* 主体骨架 */
.main { padding-top: var(--s5); }
.cols { display: block; }
.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  padding: var(--s3) var(--s4);
  margin-bottom: var(--s5);
}
.toc > summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.toc__list { margin: var(--s3) 0 0; padding-left: 20px; }
.toc__list li { font-size: 14px; line-height: 1.6; }
.toc__hint { margin: var(--s3) 0 0; padding-top: var(--s3); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.toc__hint a { display: block; }
.toc__sib { margin: var(--s2) 0 0; font-size: 14px; line-height: 1.8; }
.toc__sib span { color: var(--muted); }

article { min-width: 0; }

.crumb { font-size: 13px; color: var(--muted); margin: 0 0 var(--s3); line-height: 1.6; }
.hero { border-bottom: 1px solid var(--line); padding-bottom: var(--s4); margin-bottom: var(--s5); }
.hero__kicker {
  display: inline-block;
  margin: 0 0 var(--s3);
  padding: 2px var(--s2);
  background: var(--accent-wash);
  color: var(--accent);
  border-radius: var(--r1);
  font-size: 12px;
  line-height: 1.6;
}
.hero h1 { margin-bottom: var(--s3); }
.hero__lede { font-size: 17px; color: var(--ink); margin: 0; }
.meta { margin: var(--s3) 0 0; font-size: 13px; color: var(--muted); }

.sec { border-top: 1px solid var(--line); padding: var(--s6) 0 0; margin: 0 0 var(--s6); }
.sec:first-of-type { border-top: none; padding-top: 0; }
.sec > h2 { margin-bottom: var(--s3); }
.sec h3 { margin: var(--s5) 0 var(--s2); }
.sec h3:first-child { margin-top: 0; }

/* 入口网格 */
.grid { display: grid; grid-template-columns: 1fr; gap: var(--s3); margin-bottom: var(--s5); }
.card {
  display: block;
  padding: var(--s3) var(--s4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  text-decoration: none;
  color: var(--ink);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card:hover { transform: translateY(-1px); box-shadow: var(--sh1); }
.card:active { transform: none; }
.card__name { display: block; font-weight: 700; }
.card__note { display: block; margin-top: 2px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.card__tag { display: inline-block; margin-top: var(--s2); font-size: 12px; color: var(--gold); }

/* 横条清单 */
.rowlist { border-top: 1px solid var(--line); margin-bottom: var(--s5); }
.row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s1) var(--s4);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.row__t { font-weight: 700; }
.row__d { color: var(--muted); font-size: 13px; line-height: 1.6; }
.row:hover .row__t { text-decoration: underline; }

/* 词条表 */
.entry { border-top: 1px solid var(--line); margin-bottom: var(--s5); }
.entry__row { display: grid; grid-template-columns: 1fr; gap: var(--s1); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.entry__key { font-weight: 700; }
.entry__val { color: var(--ink); font-size: 15px; }

/* 数据表 */
.tblwrap { overflow-x: auto; margin-bottom: var(--s5); }
.tbl { width: 100%; min-width: 420px; border-collapse: collapse; background: var(--surface); }
.tbl th, .tbl td { padding: var(--s2) var(--s3); text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.6; }
.tbl thead th { background: var(--surface-2); font-weight: 700; }
.tbl tbody th { font-weight: 700; }

/* 步骤 */
.steps { list-style: none; padding: 0; margin: 0 0 var(--s5); counter-reset: step; }
.step { position: relative; padding: 0 0 var(--s4) 34px; border-bottom: 1px solid var(--line); margin-bottom: var(--s4); counter-increment: step; }
.step:last-child { border-bottom: none; }
.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--r1);
  font-size: 12px;
  line-height: 1;
}
.step__t { font-weight: 700; }
.step__b { font-size: 15px; }

/* 提示块 */
.note { background: var(--surface-2); border-top: 2px solid var(--accent); border-radius: 0 0 var(--r2) var(--r2); padding: var(--s3) var(--s4); margin: 0 0 var(--s5); }
.note > p { margin: 0; font-size: 15px; }
.note__tag { display: inline-block; margin-bottom: var(--s1); font-size: 12px; color: var(--accent); }
.note--warn { background: var(--warn-wash); border-top-color: var(--gold); }
.note--warn .note__tag { color: var(--gold); }
.note--risk { background: var(--danger-wash); border-top-color: var(--danger); }
.note--risk .note__tag { color: var(--danger); }

/* 问答与折叠面板 */
.faq { margin-bottom: var(--s5); }
.faq__item, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); margin-bottom: var(--s2); }
.faq__item > summary, .panel > summary { cursor: pointer; padding: var(--s3) var(--s4); font-weight: 700; list-style: none; }
.faq__item > summary::-webkit-details-marker, .panel > summary::-webkit-details-marker { display: none; }
.faq__item > summary::before, .panel > summary::before { content: "＋"; color: var(--accent); margin-right: var(--s2); font-weight: 400; }
.faq__item[open] > summary::before, .panel[open] > summary::before { content: "－"; }
.faq__body, .panel__body { padding: 0 var(--s4) var(--s3); font-size: 15px; }
.faq__body p:last-child, .panel__body p:last-child { margin-bottom: 0; }

/* 图组 */
.figs { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); margin: 0 0 var(--s5); }
.fig { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); padding: var(--s2); }
.fig img { display: block; width: 100%; height: auto; border-radius: var(--r1); }
.fig figcaption { margin-top: var(--s1); font-size: 12px; color: var(--muted); }

/* 内链清单 */
.linklist { list-style: none; padding: 0; margin: 0 0 var(--s5); }
.linklist li { padding: var(--s2) 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.linklist span { display: block; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* 检索 */
.finder { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); padding: var(--s4); margin-bottom: var(--s5); }
.finder label { display: block; font-weight: 700; margin-bottom: var(--s2); }
.finder input { width: 100%; max-width: 420px; padding: var(--s2) var(--s3); font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r2); }
.finder input:focus { border-color: var(--accent); }
.finder__out { margin: var(--s2) 0 0; font-size: 13px; color: var(--muted); }
.is-hidden { display: none; }

/* 页脚 */
.ftr { margin-top: var(--s7); background: var(--surface); border-top: 1px solid var(--line); padding: var(--s6) 0; }
.ftr__in { display: grid; grid-template-columns: 1fr; gap: var(--s5); }
.ftr__brand { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); }
.ftr__name { font-weight: 700; font-size: 17px; line-height: 1.4; }
.ftr__note { margin: 0; font-size: 13px; color: var(--muted); max-width: 46ch; }
.ftr__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s4); }
.ftr__col h2 { font-size: 14px; margin-bottom: var(--s2); }
.ftr__col ul { list-style: none; padding: 0; margin: 0; }
.ftr__col li { margin: 0 0 var(--s1); font-size: 14px; }

/* 唯一的寻芳入口 */
[data-site-cta="xunfang"] {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(560px, calc(100% - 28px));
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: var(--s3) var(--s5);
  background: var(--cta-bg);
  color: var(--accent-ink);
  border: 1px solid var(--cta-bg);
  border-radius: var(--r2);
  box-shadow: var(--sh2);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  z-index: 40;
}
[data-site-cta="xunfang"]:visited { color: var(--accent-ink); }
[data-site-cta="xunfang"]:hover { background: var(--cta-bg-hover); color: var(--accent-ink); text-decoration: none; }
[data-site-cta="xunfang"]:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.xcta__txt { position: relative; z-index: 1; }

[data-site-cta="xunfang"]::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--cta-seal);
  border-radius: var(--r1);
  opacity: .2;
  transform: scale(1.24);
  animation: cta-seal-press var(--cta-loop) var(--cta-ease) infinite;
  pointer-events: none;
}
[data-site-cta="xunfang"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cta-ink);
  border-radius: var(--r2);
  opacity: 0;
  animation: cta-ink-bleed var(--cta-loop) var(--cta-ease) infinite;
  pointer-events: none;
}

@keyframes cta-seal-press {
  0% { transform: scale(1.24); opacity: 0; }
  32% { transform: scale(1); opacity: .92; }
  58% { transform: scale(1); opacity: .2; }
  100% { transform: scale(1); opacity: .2; }
}

@keyframes cta-ink-bleed {
  0% { opacity: 0; }
  44% { opacity: 0; }
  62% { opacity: .16; }
  84% { opacity: 0; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  [data-site-cta="xunfang"]::before { animation: none; transform: scale(1); opacity: .5; }
  [data-site-cta="xunfang"]::after { animation: none; opacity: 0; }
  .card { transition: none; }
}

@media (min-width: 620px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .entry__row { grid-template-columns: 132px 1fr; gap: var(--s4); }
  .figs { grid-template-columns: repeat(3, 1fr); }
  .hero__lede { font-size: 18px; }
  .ftr__in { grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); }
}

@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .grid--wide { grid-template-columns: repeat(5, 1fr); }
  .figs { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1080px) {
  .cols { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: var(--s6); align-items: start; }
  .cols > article { max-width: var(--container); }
  .toc { position: sticky; top: var(--s3); margin-bottom: 0; }
  .toc > summary { display: none; }
  .toc__list { margin-top: 0; }
  .grid--wide { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 619px) {
  h1 { font-size: 24px; }
  .quick__panel ul { columns: 1; }
  .toc { margin-bottom: var(--s5); }
}
