@charset "utf-8";

:root {
  --g: #00ff80;
  --b: #0000ff;
  --k: #000000;
  --w: #ffffff;
  --rail: 254px;
}

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

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

body {
  margin: 0;
  background: var(--w);
  color: var(--k);
  font-family: "Merriweather", Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
}

p,
ul,
ol,
table,
blockquote {
  margin: 0 0 1.1em;
}

a {
  color: var(--b);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  background: var(--g);
  color: var(--k);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 3px solid var(--k);
}

hr {
  border: 0;
  border-top: 4px solid var(--k);
  margin: 12px 0 26px;
}

ul,
ol {
  padding-left: 1.3em;
}

li {
  margin: 0 0 6px;
}

strong,
b {
  font-weight: 700;
}

blockquote {
  border-left: 8px solid var(--b);
  padding: 10px 0 10px 18px;
  background: #f2fff9;
  font-style: italic;
}

code,
pre {
  font-family: ui-monospace, "Courier New", monospace;
  font-size: 15px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border: 2px solid var(--k);
  padding: 8px 10px;
  text-align: left;
}

/* 左侧固定栏 */
.side-head {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  z-index: 20;
  background: var(--k);
  color: var(--w);
  border-right: 4px solid var(--g);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 16px 22px;
  overflow-y: auto;
}

.brand {
  display: block;
  font-family: "Abril Fatface", Georgia, serif;
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--g);
  text-decoration: none;
  border-bottom: 3px solid var(--g);
  padding: 4px 0 12px;
  word-break: break-word;
}

.brand:hover {
  background: var(--k);
  color: var(--w);
}

.brand .mark {
  width: 46px;
  height: auto;
  border: 0;
  margin-bottom: 8px;
}

.side-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: n;
}

.side-nav li {
  counter-increment: n;
  margin: 0;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 14px;
  border: 2px solid var(--w);
  border-radius: 999px;
  color: var(--w);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.35;
  transition: background 0s, color 0s, border-color 0s, transform 0.12s linear;
}

.side-nav a::before {
  content: counter(n, decimal-leading-zero);
  font-size: 12px;
  font-weight: 700;
  color: var(--g);
  letter-spacing: 0.06em;
}

.side-nav a:hover,
.side-nav a:focus-visible {
  background: var(--g);
  color: var(--k);
  border-color: var(--g);
  transform: translateX(4px);
}

.side-nav a:hover::before,
.side-nav a:focus-visible::before {
  color: var(--k);
}

.cta {
  margin-top: auto;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--g);
  color: var(--k);
  border: 3px solid var(--g);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
}

.cta:hover {
  background: var(--b);
  border-color: var(--b);
  color: var(--w);
}

/* 版心 */
.page {
  margin-left: var(--rail);
}

.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  text-align: right;
  background: var(--k);
  color: var(--w);
  padding: clamp(50px, 9vw, 110px) clamp(16px, 4vw, 52px) 96px;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 76px));
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  opacity: 0.45;
  z-index: 0;
}

.hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: "Abril Fatface", Georgia, serif;
  font-size: clamp(38px, 7vw, 84px);
  line-height: 1.04;
  letter-spacing: 0.01em;
  color: var(--g);
  text-shadow: 4px 4px 0 var(--k);
}

.hero-desc {
  position: relative;
  z-index: 1;
  max-width: 36ch;
  margin: 20px 0 0;
  padding: 12px 16px;
  background: var(--b);
  border: 3px solid var(--g);
  color: var(--w);
  font-size: 16px;
  line-height: 1.6;
}

main {
  display: block;
}

.wrap {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  border-top: 4px solid var(--k);
}

aside.side {
  grid-column: 1;
  align-self: start;
  position: sticky;
  top: 0;
  padding: 30px 18px 34px;
  border-right: 3px solid var(--k);
  background: var(--w);
}

aside.side h2 {
  margin: 0;
  font-family: "Abril Fatface", Georgia, serif;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

aside.side hr {
  border-top: 3px solid var(--k);
  margin: 8px 0 14px;
}

.side-ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: s;
}

.side-ol li {
  counter-increment: s;
  margin: 0;
}

.side-ol a {
  display: block;
  position: relative;
  min-height: 40px;
  padding: 8px 4px 8px 28px;
  border-bottom: 1px solid var(--k);
  color: var(--k);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.5;
}

.side-ol a::before {
  content: counter(s, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--b);
}

.side-ol a:hover {
  background: var(--g);
}

.totop {
  display: block;
  margin-top: 20px;
  padding: 11px 10px;
  min-height: 44px;
  text-align: center;
  border: 3px solid var(--k);
  background: var(--g);
  color: var(--k);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
}

.totop:hover {
  background: var(--b);
  color: var(--w);
  border-color: var(--b);
}

.body-sec {
  grid-column: 2;
  padding: 0 clamp(16px, 3vw, 44px);
  min-width: 0;
}

article {
  max-width: 760px;
  padding: 12px 0 40px;
}

article > div {
  position: relative;
  padding: 40px 0 46px 22px;
  border-left: 8px solid var(--g);
  border-bottom: 4px solid var(--k);
  scroll-margin-top: 18px;
}

article > div:nth-child(odd) {
  border-left-color: var(--b);
}

article > div:last-child {
  border-bottom: 0;
}

article h2 {
  font-family: "Abril Fatface", Georgia, serif;
  font-size: clamp(25px, 3.3vw, 38px);
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 0.1em 0 10px;
}

article h3 {
  font-family: "Abril Fatface", Georgia, serif;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.25;
  margin: 1.2em 0 10px;
}

article h2 + hr,
article h3 + hr {
  margin: 0 0 24px;
}

article p:last-child,
article ul:last-child {
  margin-bottom: 0;
}

[data-anim] article > div {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.14s linear, transform 0.14s linear;
}

[data-anim] article > div.in {
  opacity: 1;
  transform: none;
}

/* 页脚 */
.foot {
  margin-left: var(--rail);
  background: var(--k);
  color: var(--w);
  border-top: 6px solid var(--g);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 30px;
  padding: 30px clamp(16px, 3vw, 44px);
}

.f-brand {
  font-family: "Abril Fatface", Georgia, serif;
  font-size: clamp(28px, 3.6vw, 54px);
  line-height: 1;
  color: var(--g);
  border-bottom: 4px solid var(--g);
  padding-bottom: 6px;
}

.f-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  max-width: 100%;
}

.f-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 0;
  color: var(--w);
  text-decoration: none;
  font-size: 16px;
  border-bottom: 2px solid transparent;
}

.f-nav a:hover {
  color: var(--g);
  background: var(--k);
  border-bottom-color: var(--g);
}

.f-copy {
  flex: 1 1 160px;
  text-align: center;
  font-size: 16px;
  color: var(--g);
}

.f-top a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 2px solid var(--g);
  color: var(--g);
  text-decoration: none;
  font-size: 16px;
}

.f-top a:hover {
  background: var(--g);
  color: var(--k);
}

@media (max-width: 900px) {
  .side-head {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 5px solid var(--g);
    gap: 12px;
    padding: 16px;
    overflow: visible;
  }

  .brand {
    font-size: 22px;
    padding-bottom: 10px;
  }

  .side-nav ol {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .side-nav li {
    flex: 0 0 auto;
  }

  .side-nav a {
    white-space: nowrap;
  }

  .side-nav a:hover {
    transform: none;
  }

  .cta {
    margin-top: 2px;
    align-self: stretch;
  }

  .page,
  .foot {
    margin-left: 0;
  }

  .hero {
    min-height: 60vh;
    padding: 46px 16px 62px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 44px));
  }

  .hero h1 {
    text-shadow: 3px 3px 0 var(--k);
  }

  .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  aside.side {
    grid-column: 1;
    position: static;
    border-right: 0;
    border-bottom: 4px solid var(--k);
    padding: 22px 16px 26px;
  }

  .side-ol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;
  }

  .body-sec {
    grid-column: 1;
    padding: 0 16px;
  }

  article {
    max-width: none;
  }

  article > div {
    padding: 30px 0 34px 14px;
    border-left-width: 6px;
  }

  .foot {
    justify-content: flex-start;
  }

  .f-copy {
    text-align: left;
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }

  [data-anim] article > div {
    opacity: 1;
    transform: none;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
