.page-events-rules {
  --rules-read: min(100%, calc(var(--container) - var(--space-8) * 3));
  background: var(--color-surface);
  color: var(--color-ink);
  font-family: var(--font-body);
}

/* 面包屑留白 */
.page-events-rules .rules-crumb {
  padding-top: var(--space-6);
}

/* 文档头部 */
.page-events-rules .rules-masthead {
  padding: var(--space-4) 0 var(--space-6);
  border-bottom: 1px solid var(--color-line);
}

.page-events-rules .rules-title {
  margin: 0 0 var(--space-3);
  max-width: 24ch;
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  color: var(--color-ink);
}

.page-events-rules .rules-lede {
  margin: 0 0 var(--space-4);
  max-width: var(--rules-read);
  font-size: var(--text-lg);
  line-height: var(--leading-body);
  color: var(--color-ink-soft);
}

.page-events-rules .rules-backbar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-ink-muted);
}

.page-events-rules .rules-backbar__line {
  flex: 0 0 auto;
  width: var(--space-6);
  height: 1px;
  background: var(--color-line);
}

/* 区块与标题 */
.page-events-rules .rules-section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.page-events-rules .section--tight.rules-section {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.page-events-rules .rules-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-line);
}

.page-events-rules .rules-head__num {
  flex: 0 0 auto;
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--weight-heading);
  line-height: 1;
  color: var(--color-primary);
  letter-spacing: var(--tracking-heading);
}

.page-events-rules .rules-head__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.page-events-rules .rules-head__kick {
  margin: 0;
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  color: var(--color-ink-muted);
}

.page-events-rules .rules-head__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
  color: var(--color-ink);
}

/* 正文流 */
.page-events-rules .rules-flow {
  max-width: var(--rules-read);
}

.page-events-rules .rules-flow--intro {
  margin-bottom: var(--space-4);
}

.page-events-rules .rules-flow p {
  margin: 0 0 var(--space-3);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--color-ink);
}

.page-events-rules .rules-flow p:last-child {
  margin-bottom: 0;
}

/* 01 定位说明双栏 */
.page-events-rules .rules-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.page-events-rules .rules-scope {
  padding: var(--space-3);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
}

.page-events-rules .rules-scope__title {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  color: var(--color-ink-muted);
}

.page-events-rules .rules-scope__title--mt {
  margin-top: var(--space-4);
}

.page-events-rules .rules-scope__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.page-events-rules .rules-scope__item {
  position: relative;
  padding-left: var(--space-3);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-ink-soft);
}

.page-events-rules .rules-scope__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(var(--space-1) - 1px);
  width: var(--space-1);
  height: var(--space-1);
  background: var(--color-ink-muted);
  border-radius: var(--radius-sm);
}

.page-events-rules .rules-scope__item--yes::before {
  background: var(--color-accent);
}

/* 图片 */
.page-events-rules .rules-figure {
  margin: var(--space-6) 0;
}

.page-events-rules .rules-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-1);
}

.page-events-rules .rules-figure--wide {
  max-width: var(--rules-read);
}

.page-events-rules .rules-figure--cinema {
  max-width: min(100%, var(--container));
}

.page-events-rules .rules-figure figcaption {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  line-height: 1.7;
  color: var(--color-ink-muted);
}

/* 筛选与计数 */
.page-events-rules .rules-filter {
  margin-top: var(--space-4);
}

.page-events-rules .rules-tally {
  margin: var(--space-2) 0 var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-ink-muted);
}

.page-events-rules .rules-tally .filter-count {
  font-family: var(--font-mono);
  color: var(--color-primary);
}

.page-events-rules .rules-empty {
  margin: var(--space-4) 0 0;
  padding: var(--space-3);
  background: var(--color-surface-alt);
  border-left: var(--border-thin) solid var(--color-accent);
  font-size: var(--text-sm);
  color: var(--color-ink-soft);
}

/* 条件条目 */
.page-events-rules .rules-conditions {
  border-bottom: 1px solid var(--color-line);
}

.page-events-rules .rules-cond {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--color-line);
}

.page-events-rules .rules-cond__num {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--weight-heading);
  line-height: 1;
  color: var(--color-primary);
  letter-spacing: var(--tracking-heading);
}

.page-events-rules .rules-cond__body {
  min-width: 0;
}

.page-events-rules .rules-cond__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.page-events-rules .rules-cond__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
  color: var(--color-ink);
}

.page-events-rules .rules-scope-tag {
  display: inline-block;
  flex: 0 0 auto;
  padding: 2px var(--space-1);
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--color-accent);
  background: transparent;
  border: var(--border-thin) solid var(--color-accent);
  border-radius: var(--radius-sm);
}

.page-events-rules .rules-cond__text {
  margin: 0 0 var(--space-2);
  max-width: var(--rules-read);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--color-ink);
}

.page-events-rules .rules-cond .disclosure {
  margin-top: var(--space-2);
}

.page-events-rules .rules-cond .disclosure__panel p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  color: var(--color-ink-soft);
}

/* 阶段列表 */
.page-events-rules .rules-stages {
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--color-line);
}

.page-events-rules .rules-stage {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-line);
}

.page-events-rules .rules-stage__mark {
  display: inline-block;
  margin-bottom: var(--space-2);
  padding: 2px var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-primary-ink);
  background: var(--color-primary);
  border-radius: var(--radius-sm);
}

.page-events-rules .rules-stage__title {
  margin: 0 0 var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
  color: var(--color-ink);
}

.page-events-rules .rules-stage__text {
  margin: 0;
  max-width: var(--rules-read);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--color-ink-soft);
}

/* 状态标签说明 */
.page-events-rules .rules-status-block {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-line);
}

.page-events-rules .rules-status-block__title {
  margin: 0 0 var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-heading);
  color: var(--color-ink);
}

.page-events-rules .rules-states {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.page-events-rules .rules-state {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
}

.page-events-rules .rules-state__text {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  color: var(--color-ink-soft);
}

/* 结果确认 */
.page-events-rules .rules-confirm {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.page-events-rules .rules-confirm__item {
  padding: var(--space-3);
  background: var(--color-primary-soft);
  border-radius: var(--radius-md);
  border-bottom: var(--border-thin) solid var(--color-primary);
}

.page-events-rules .rules-confirm__num {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--text-lg);
  color: var(--color-primary);
}

.page-events-rules .rules-confirm__title {
  margin: 0 0 var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--weight-heading);
  color: var(--color-ink);
}

.page-events-rules .rules-confirm__text {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  color: var(--color-ink-soft);
}

.page-events-rules .rules-callout {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--color-contrast-surface);
  border-radius: var(--radius-md);
}

.page-events-rules .rules-callout__text {
  margin: 0 0 var(--space-2);
  max-width: var(--rules-read);
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  color: var(--color-contrast-ink);
}

.page-events-rules .rules-callout__link {
  margin: 0;
  font-size: var(--text-sm);
}

.page-events-rules .rules-callout .link-underline {
  color: var(--color-contrast-accent);
}

/* 例外色带 */
.page-events-rules .rules-band {
  padding: var(--space-6) var(--space-3) var(--space-6) var(--space-4);
  background: var(--color-surface-deep);
  border-left: var(--border-thin) solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.page-events-rules .rules-band__lede {
  margin: 0 0 var(--space-4);
  max-width: var(--rules-read);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--color-ink);
}

.page-events-rules .rules-exceptions {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.page-events-rules .rules-exception-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.page-events-rules .rules-exception {
  padding-left: var(--space-3);
  border-left: 1px solid var(--color-line);
}

.page-events-rules .rules-exception__title {
  margin: 0 0 var(--space-1);
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
  color: var(--color-ink);
}

.page-events-rules .rules-exception__text {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  color: var(--color-ink-soft);
}

.page-events-rules .rules-side-figure {
  margin: 0;
}

.page-events-rules .rules-side-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-line);
}

.page-events-rules .rules-side-figure figcaption {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  line-height: 1.7;
  color: var(--color-ink-muted);
}

/* 相邻主题入口 */
.page-events-rules .rules-next {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--color-line);
}

.page-events-rules .rules-next__item {
  border-bottom: 1px solid var(--color-line);
}

.page-events-rules .rules-next__link {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3) 0;
  text-decoration: none;
  color: var(--color-ink);
  transition: padding-left 120ms linear;
}

.page-events-rules .rules-next__link:hover,
.page-events-rules .rules-next__link:focus-visible {
  padding-left: var(--space-2);
}

.page-events-rules .rules-next__link:focus-visible {
  outline: var(--border-thin) solid var(--color-focus);
  outline-offset: 2px;
}

.page-events-rules .rules-next__label {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
  color: var(--color-primary);
}

.page-events-rules .rules-next__desc {
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  color: var(--color-ink-soft);
}

/* 窄屏与宽屏适配 */
@media (max-width: 600px) {
  .page-events-rules .rules-head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .page-events-rules .rules-head__num {
    font-size: var(--text-2xl);
  }

  .page-events-rules .rules-head__title {
    font-size: var(--text-xl);
  }

  .page-events-rules .rules-title {
    font-size: var(--text-3xl);
  }

  .page-events-rules .rules-band {
    padding: var(--space-4) var(--space-2) var(--space-4) var(--space-3);
  }

  .page-events-rules .rules-callout {
    padding: var(--space-3);
  }
}

@media (min-width: 720px) {
  .page-events-rules .rules-cond {
    grid-template-columns: calc(var(--space-8) + var(--space-3)) minmax(0, 1fr);
    gap: var(--space-4);
  }

  .page-events-rules .rules-states {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-events-rules .rules-confirm {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-events-rules .rules-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--space-6);
  }

  .page-events-rules .rules-stages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-events-rules .rules-stage {
    padding-right: var(--space-4);
  }

  .page-events-rules .rules-stage:nth-child(odd) {
    padding-right: var(--space-4);
  }

  .page-events-rules .rules-next {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-6);
  }
}

@media (min-width: 960px) {
  .page-events-rules .rules-exceptions {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: var(--space-6);
    align-items: start;
  }

  .page-events-rules .rules-stages {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .page-events-rules .rules-stage {
    padding-right: var(--space-3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-events-rules .rules-next__link {
    transition: none;
  }
}
