/*
 * ACECode 下载页样式。
 * 视觉沿用 ge.bigjuan.xyz/acemodel 官网的像素风:寒蝉点阵体、2px 墨线、零圆角、硬阴影按钮、海军蓝强调色。
 * 点阵字体在 16px 的整数倍下最清晰,所以正文统一 16px,标题取 32 / 48 / 64 / 80px。
 */

@import "./tokens.css";

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--ace-header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ace-paper);
  color: var(--ace-ink);
  font-family: var(--ace-font);
  font-size: 16px;
  line-height: 1.75;
  font-synthesis: none;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure,
pre {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 400;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: var(--ace-navy);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--ace-navy-strong);
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

code,
pre,
kbd {
  font-family: var(--ace-font);
  font-size: 1em;
}

:focus-visible {
  outline: 2px dashed var(--ace-navy);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: min(1088px, 100% - 48px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -64px;
  left: 16px;
  z-index: 100;
  padding: 8px 12px;
  border: var(--ace-pixel);
  background: var(--ace-navy);
  color: #fff;
}

.skip-link:focus {
  top: 8px;
  color: #fff;
}

/* ---------- 顶栏 ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-top: var(--ace-pixel);
  border-bottom: var(--ace-pixel);
  background: var(--ace-paper);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--ace-navy);
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  padding: 6px 12px;
  color: var(--ace-ink);
  line-height: 24px;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--ace-wash);
  color: var(--ace-ink);
}

.site-nav .nav-cta {
  margin-left: 10px;
  border: var(--ace-pixel);
  background: var(--ace-navy);
  box-shadow: var(--ace-shadow-sm);
  color: #fff;
}

.site-nav .nav-cta:hover {
  background: var(--ace-navy-strong);
  box-shadow: 1px 1px 0 var(--ace-ink);
  color: #fff;
  transform: translate(1px, 1px);
}

/* Shared hero typography, preserved from the download page. */
.display { margin-top: 32px; font-size: 80px; line-height: 1.05; letter-spacing: 0; }
.display strong { display: block; color: var(--ace-navy); font-weight: 400; }
.lead { max-width: 640px; margin-top: 32px; color: var(--ace-graphite); }
.actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 16px; margin-top: 32px; }

/* ---------- 通用组件 ---------- */

.eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ace-navy);
  line-height: 1.5;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--ace-navy);
}

.section {
  padding-block: clamp(64px, 8vw, 96px);
  border-top: var(--ace-pixel);
}

.section-heading {
  margin-top: 24px;
  font-size: 48px;
  line-height: 1.25;
}

.section-lead {
  max-width: 720px;
  margin-top: 16px;
  color: var(--ace-graphite);
}

.section-lead code,
.verify-foot code,
.hint code {
  padding: 0 4px;
  border: 1px solid var(--ace-line-strong);
  background: var(--ace-wash);
  color: var(--ace-ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: var(--ace-pixel);
  background: var(--ace-paper);
  box-shadow: var(--ace-shadow);
  color: var(--ace-ink);
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
}

.button:hover {
  box-shadow: var(--ace-shadow-sm);
  color: var(--ace-ink);
  transform: translate(2px, 2px);
}

.button:active {
  box-shadow: none;
  transform: translate(4px, 4px);
}

.button-primary {
  background: var(--ace-navy);
  color: #fff;
}

.button-primary:hover {
  background: var(--ace-navy-strong);
  color: #fff;
}

.button-download {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  min-height: 60px;
  padding: 6px 18px;
  text-align: left;
}

.button-meta {
  color: var(--ace-muted);
}

.button-primary .button-meta {
  color: var(--ace-on-navy-muted);
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 8px;
  border: var(--ace-pixel);
  background: var(--ace-paper);
  box-shadow: var(--ace-shadow-sm);
  line-height: 1;
  white-space: nowrap;
}

.mini-button:hover {
  box-shadow: 1px 1px 0 var(--ace-ink);
  transform: translate(1px, 1px);
}

.mini-button:active {
  box-shadow: none;
  transform: translate(2px, 2px);
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 8px;
  border: var(--ace-pixel);
  line-height: 1;
  white-space: nowrap;
}

.tag-stable {
  background: var(--ace-navy);
  color: #fff;
}

.tag-pre {
  background: var(--ace-wash);
}

.tag-latest {
  background: var(--ace-ink);
  color: #fff;
}

.index-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 24px;
  padding: 0 4px;
  background: var(--ace-navy);
  color: #fff;
  line-height: 1;
}

.loading-block {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 120px;
  margin-top: 32px;
  padding: 24px;
  border: var(--ace-pixel);
  color: var(--ace-muted);
}

.inline-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ace-muted);
}

.pixel-loader {
  display: inline-grid;
  flex: none;
  grid-template-columns: repeat(8, 8px);
  gap: 4px;
}

.pixel-loader i {
  width: 8px;
  height: 8px;
  background: var(--ace-line);
  animation: pixel-run 1.2s steps(1, end) infinite;
}

.pixel-loader i:nth-child(2) { animation-delay: 0.15s; }
.pixel-loader i:nth-child(3) { animation-delay: 0.3s; }
.pixel-loader i:nth-child(4) { animation-delay: 0.45s; }
.pixel-loader i:nth-child(5) { animation-delay: 0.6s; }
.pixel-loader i:nth-child(6) { animation-delay: 0.75s; }
.pixel-loader i:nth-child(7) { animation-delay: 0.9s; }
.pixel-loader i:nth-child(8) { animation-delay: 1.05s; }

@keyframes pixel-run {
  0%,
  24% {
    background: var(--ace-navy);
  }
  25%,
  100% {
    background: var(--ace-line);
  }
}

.notice {
  margin-top: 32px;
  padding: 24px;
  border: var(--ace-pixel);
  box-shadow: var(--ace-shadow-navy);
}

.notice h3 {
  font-size: 32px;
  line-height: 1.25;
}

.notice p {
  margin-top: 12px;
  color: var(--ace-graphite);
}

.notice .actions {
  margin-top: 20px;
}

