:root {
  --bg: #ffffff;
  --text: #171a20;
  --muted: #5e6673;
  --line: #d9dee7;
  --accent: #1456c0;
  --accent-soft: #eef4ff;
  --code-bg: #f7f9fc;
  --content: 1380px;
  --article: 760px;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, serif;
  --sans: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 3px solid rgba(20, 86, 192, 0.28);
  outline-offset: 4px;
}

.site-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-inner,
.page-width,
.footer-inner {
  width: min(calc(100% - 64px), var(--content));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  min-height: 84px;
  align-items: stretch;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  align-items: stretch;
  gap: 42px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #303641;
  font-size: 16px;
  font-weight: 500;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: scaleX(0.6);
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--accent);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

main {
  flex: 1;
}

.hero {
  padding: 120px 0 54px;
}

.hero h1 {
  max-width: 1320px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 70px);
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1.24;
}

.hero p {
  max-width: 700px;
  margin: 24px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.75;
}

.notes-section {
  padding-bottom: 34px;
}

.section-title {
  margin: 0;
  padding-bottom: 18px;
  border-bottom: 1px solid #bfc6d1;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.4;
}

.note-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.note-row {
  border-bottom: 1px solid var(--line);
}

.note-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 28px;
  gap: 34px;
  align-items: center;
  padding: 28px 2px;
  transition: background-color 160ms ease, padding 160ms ease;
}

.note-link:hover {
  padding-right: 12px;
  padding-left: 12px;
  background: var(--accent-soft);
}

.note-copy h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.45;
}

.note-copy p {
  max-width: 780px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.note-meta {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.note-category {
  display: block;
  color: var(--accent);
}

.note-arrow {
  display: inline-flex;
  color: var(--accent);
  transition: transform 160ms ease;
}

.note-link:hover .note-arrow {
  transform: translateX(4px);
}

.note-arrow svg {
  width: 25px;
  height: 25px;
}

.notes-index-head {
  padding: 76px 0 42px;
}

.notes-index-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(38px, 4vw, 56px);
  line-height: 1.3;
}

.notes-index-head p {
  margin: 16px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.7;
}

.article {
  width: min(calc(100% - 48px), var(--article));
  margin: 0 auto;
  padding: 42px 0 54px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
}

.back-link svg {
  width: 18px;
  height: 18px;
  transition: transform 160ms ease;
}

.back-link:hover svg {
  transform: translateX(-3px);
}

.article-header h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 4vw, 42px);
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.article-meta .category {
  color: var(--accent);
}

.article-body {
  margin-top: 24px;
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.78;
}

.article-body h2 {
  margin: 27px 0 7px;
  font-size: 24px;
  line-height: 1.45;
}

.article-body p {
  margin: 0 0 12px;
}

.article-body code {
  padding: 0.1em 0.32em;
  border-radius: 3px;
  background: var(--code-bg);
  color: #2e4771;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

.article-body pre {
  overflow-x: auto;
  margin: 14px 0 16px;
  padding: 14px 18px;
  border: 1px solid #cbd2de;
  border-radius: 4px;
  background: var(--code-bg);
  line-height: 1.5;
}

.article-body pre code {
  padding: 0;
  background: transparent;
  color: #253650;
  font-size: 14px;
}

.site-footer {
  border-top: 1px solid #bfc6d1;
}

.footer-inner {
  display: flex;
  min-height: 94px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  color: var(--muted);
  font-size: 14px;
}

.filing-link {
  color: var(--accent);
}

.filing-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.error-page {
  display: grid;
  min-height: 62vh;
  place-items: center;
  padding: 48px 24px;
  text-align: center;
}

.error-page h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 64px;
}

.error-page p {
  margin: 14px 0 26px;
  color: var(--muted);
}

.text-link {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 760px) {
  .header-inner,
  .page-width,
  .footer-inner {
    width: min(calc(100% - 36px), var(--content));
  }

  .header-inner {
    min-height: 70px;
  }

  .brand {
    font-size: 19px;
  }

  .site-nav {
    gap: 22px;
  }

  .nav-link {
    font-size: 14px;
  }

  .hero {
    padding: 64px 0 56px;
  }

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

  .hero p {
    margin-top: 18px;
    font-size: 18px;
  }

  .notes-section {
    padding-bottom: 54px;
  }

  .section-title {
    font-size: 23px;
  }

  .note-link {
    grid-template-columns: minmax(0, 1fr) 22px;
    gap: 14px;
    padding: 24px 0;
  }

  .note-link:hover {
    padding-right: 6px;
    padding-left: 6px;
  }

  .note-copy h2 {
    font-size: 21px;
  }

  .note-copy p {
    font-size: 14px;
  }

  .note-meta {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    gap: 12px;
  }

  .note-arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .note-category {
    display: inline;
  }

  .notes-index-head {
    padding: 56px 0 32px;
  }

  .article {
    width: min(calc(100% - 36px), var(--article));
    padding: 42px 0 62px;
  }

  .article-header h1 {
    font-size: 36px;
  }

  .article-body {
    font-size: 16px;
    line-height: 1.9;
  }

  .article-body h2 {
    font-size: 24px;
  }

  .article-body pre {
    margin-right: -4px;
    margin-left: -4px;
    padding: 18px;
  }

  .footer-inner {
    min-height: 112px;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    text-align: center;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
