:root {
  --bg: #eef4fa;
  --surface: #ffffff;
  --surface-2: #f7fafd;
  --text: #17222e;
  --text-muted: #4c5f72;
  --line: #d3e0ec;
  --dot: #dfeaf5;
  --brand: #007cdc;
  --accent: #0b5ea8;
  --accent-ink: #ffffff;
  --ok: #1f7a4d;
  --alert: #b3261e;
  --warm: #a35a00;
  --header-band: #0b3d67;
  --cta-fill: #0b3d67;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(23, 34, 46, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 0);
  background-size: 18px 18px;
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

h1 {
  font-size: 34px;
  line-height: 1.28;
}

h2 {
  font-size: 24px;
  line-height: 1.4;
}

h3 {
  font-size: 19px;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--text);
}

.skip:focus {
  left: 12px;
  top: 12px;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Header */

.masthead {
  background: var(--surface);
  border-bottom: 3px solid var(--brand);
}

.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__text strong {
  font-size: 24px;
  letter-spacing: 0.08em;
}

.brand__text small {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
  font-size: 14px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  border-bottom: 2px solid transparent;
  color: var(--text);
}

.nav a:hover {
  color: var(--accent);
  text-decoration: none;
  border-bottom-color: var(--brand);
}

.nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--brand);
  font-weight: 600;
}

main {
  padding: 28px 0 56px;
}

/* Home hero */

.hero {
  margin-bottom: 28px;
  padding: 40px 28px 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.hero__mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.28;
  letter-spacing: 0.02em;
}

.hero__tag {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.steps {
  display: inline-block;
  width: min(100%, 260px);
  margin: 0 auto;
  text-align: left;
}

.steps__label {
  display: block;
  margin: 10px 0 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.step-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  margin-bottom: 8px;
  padding: 10px 14px;
  border-radius: 6px;
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.step-btn:hover {
  text-decoration: none;
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.step-btn--ok {
  background: var(--ok);
}

.step-btn--accent {
  background: var(--accent);
}

.step-btn--warm {
  background: var(--warm);
}

.hero__lede {
  max-width: 760px;
  margin: 26px auto 0;
  text-align: left;
}

.hero__lede p {
  margin: 0;
  font-size: 17px;
}

/* Sections */

.sec {
  margin: 34px 0;
}

.sec__title {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-align: center;
}

.sec__sub {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

.board {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.board li {
  border-bottom: 1px solid var(--line);
}

.board a {
  display: grid;
  grid-template-columns: 52px 1fr 22px;
  gap: 12px;
  align-items: center;
  padding: 14px 6px;
  color: var(--text);
}

.board a:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.board__no {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.board__name {
  font-size: 17px;
  font-weight: 600;
}

.board__name em {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  color: var(--text-muted);
}

.board__count {
  font-size: 13px;
  color: var(--text-muted);
}

.board__arrow {
  font-size: 16px;
  color: var(--accent);
  transition: transform 0.15s ease;
}

.board a:hover .board__arrow {
  transform: translateX(3px);
}

/* Table */

.table-scroll {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ledger {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 15px;
}

.ledger th {
  padding: 11px 14px;
  background: var(--header-band);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.ledger td {
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.ledger tr:nth-child(even) td {
  background: var(--surface-2);
}

.ledger a {
  font-weight: 600;
}

/* Rules */

.rules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.rule {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--alert);
  border-radius: 8px;
}

.rule h3 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.5;
}

.rule p {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
}

/* Rows */

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.rows li {
  border-bottom: 1px solid var(--line);
}

.rows a {
  display: block;
  padding: 13px 6px;
  color: var(--text);
}

.rows a:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.rows strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
}

.rows strong em {
  margin-left: 6px;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  color: var(--accent);
}

.rows span {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--text-muted);
}

/* Chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
}

.chip:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
}

/* Crumb and page head */

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.crumb a {
  color: var(--text-muted);
}

.crumb span[aria-current="page"] {
  color: var(--text);
}

.pagehead {
  margin-bottom: 22px;
  padding: 26px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.pagehead h1 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.35;
}

.pagehead__lede {
  margin: 0;
  font-size: 17px;
  color: var(--text-muted);
}

.kicker {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.copy {
  margin-bottom: 22px;
  padding: 26px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.copy p {
  margin: 0 0 14px;
  font-size: 17px;
}

.copy p:last-child {
  margin-bottom: 0;
}

/* Article */

.sheet {
  max-width: 760px;
  margin: 0 auto;
  padding: 34px 38px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sheet h1 {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.35;
}

.sheet__lede {
  margin: 0 0 20px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-muted);
}

.prose p {
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.85;
}

.prose p:last-child {
  margin-bottom: 0;
}

.sheet__foot {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.sheet__foot h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.follow-title {
  margin-top: 24px;
}

.back {
  margin: 18px 0 0;
  font-size: 14px;
}

.more-links {
  margin: 22px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* Tag index */

.taglist {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.taglist li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.taglist h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.taglist p {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--text-muted);
}

.taglist__links a {
  margin-right: 12px;
  font-size: 14px;
}

/* Footer */

.foot {
  margin-top: 40px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.foot__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 24px;
  padding-top: 28px;
  padding-bottom: 44px;
}

.foot__brand {
  flex: 1 1 480px;
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
}

.foot__brand a {
  color: var(--text);
  font-weight: 700;
}

.foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 14px;
}

.foot__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.foot__copy {
  width: 100%;
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Floating rail */

.rail {
  display: none;
}

@media (min-width: 1240px) {
  .rail {
    position: fixed;
    top: 190px;
    right: 18px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .rail a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: var(--accent-ink);
    font-size: 15px;
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease;
  }

  .rail a:hover {
    text-decoration: none;
    transform: scale(1.03);
  }

  .rail__a {
    background: var(--warm);
  }

  .rail__b {
    background: var(--alert);
  }

  .rail__c {
    background: var(--ok);
  }
}

/* Small screens */

@media (max-width: 720px) {
  .wrap {
    padding: 0 20px;
  }

  main {
    padding-top: 20px;
  }

  .hero {
    padding: 28px 18px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .pagehead,
  .copy,
  .sheet {
    padding: 22px 18px;
  }

  .pagehead h1,
  .sheet h1 {
    font-size: 27px;
  }

  .sheet__lede {
    font-size: 17px;
  }

  .copy p,
  .prose p {
    font-size: 16px;
  }

  .sec__title {
    font-size: 22px;
  }

  .board a {
    grid-template-columns: 38px 1fr 18px;
    gap: 10px;
  }

  .board__count {
    display: none;
  }

  .rules {
    grid-template-columns: 1fr;
  }

  .foot__inner {
    padding-top: 22px;
    padding-bottom: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .step-btn,
  .board__arrow,
  .rail a {
    transition: none;
  }
}
