:root {
  color-scheme: light dark;
  --background: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #eaf0fb;
  --text: #172033;
  --muted: #59657a;
  --line: #d8e1ef;
  --accent: #315fc4;
  --accent-strong: #244b9c;
  --focus: #173f91;
  --radius: 14px;
  --page: min(1120px, calc(100% - 48px));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    linear-gradient(135deg, rgb(49 95 196 / 7%), transparent 36rem),
    var(--background);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--accent);
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 4px;
}

.site-header {
  width: var(--page);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.site-name {
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

nav a {
  color: var(--muted);
  font-size: 0.94rem;
  text-decoration: none;
}

nav a[aria-current="page"] {
  color: var(--text);
}

main {
  width: var(--page);
  margin: 0 auto;
}

.hero {
  min-height: min(690px, 72dvh);
  padding: 88px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.6fr);
  align-items: center;
  gap: clamp(48px, 9vw, 128px);
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.hero h1 {
  max-width: 10ch;
  margin-bottom: 28px;
  font-size: clamp(3.3rem, 8vw, 6.6rem);
  font-weight: 780;
}

.lead {
  max-width: 28ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.current-notes {
  padding: 30px 0 30px 32px;
  border-left: 3px solid var(--accent);
}

.current-notes h2 {
  margin-bottom: 14px;
  font-size: 1.1rem;
}

.current-notes p {
  max-width: 29ch;
  margin-bottom: 0;
  color: var(--muted);
}

.topics {
  padding: 86px 0 112px;
  border-top: 1px solid var(--line);
}

.topics > h2 {
  max-width: 11ch;
  margin-bottom: 56px;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.topic-list {
  margin-left: clamp(0px, 12vw, 150px);
}

.topic-list article {
  padding: 30px 0;
  display: grid;
  grid-template-columns: minmax(140px, 0.4fr) minmax(0, 1fr);
  gap: 40px;
  border-top: 1px solid var(--line);
}

.topic-list article:last-child {
  border-bottom: 1px solid var(--line);
}

.topic-list h3 {
  margin-bottom: 0;
  font-size: 1.08rem;
}

.topic-list p {
  max-width: 40rem;
  margin-bottom: 0;
  color: var(--muted);
}

.inner-page {
  padding: 96px 0 120px;
}

.page-heading {
  max-width: 680px;
  margin-bottom: 88px;
}

.page-heading h1,
.not-found h1 {
  margin-bottom: 22px;
  font-size: clamp(3rem, 7vw, 5.6rem);
}

.page-heading > p:last-child,
.not-found > p {
  color: var(--muted);
}

.release {
  padding: 30px 0;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 40px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.release time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.release h2 {
  margin-bottom: 10px;
  font-size: 1.35rem;
}

.release p {
  margin-bottom: 0;
  color: var(--muted);
}

.not-found {
  padding: 112px 0;
}

.error-code {
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.text-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--accent-strong);
  font-weight: 700;
}

.site-footer {
  width: var(--page);
  margin: 0 auto;
  padding: 26px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.icp-link {
  white-space: nowrap;
}

@media (max-width: 767px) {
  :root {
    --page: calc(100% - 40px);
  }

  .site-header {
    min-height: 64px;
  }

  .site-name {
    font-size: 0.94rem;
  }

  .hero {
    min-height: auto;
    padding: 68px 0 72px;
    grid-template-columns: 1fr;
    gap: 58px;
  }

  .hero h1 {
    font-size: clamp(3.1rem, 16vw, 5.1rem);
  }

  .current-notes {
    padding: 24px 0 24px 24px;
  }

  .topics {
    padding: 68px 0 84px;
  }

  .topics > h2 {
    margin-bottom: 38px;
  }

  .topic-list {
    margin-left: 0;
  }

  .topic-list article,
  .release {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .inner-page {
    padding: 68px 0 88px;
  }

  .page-heading {
    margin-bottom: 56px;
  }

  .not-found {
    padding: 80px 0;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #101521;
    --surface: #171e2c;
    --surface-soft: #1b2740;
    --text: #edf2fb;
    --muted: #aab6cb;
    --line: #2a3548;
    --accent: #84a6ee;
    --accent-strong: #b6cafa;
    --focus: #a7c0f7;
  }

  body {
    background:
      linear-gradient(135deg, rgb(80 119 205 / 13%), transparent 36rem),
      var(--background);
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
