/* AIhistory1012 预览站：一个手写的静态页，不引外部字体、不跑脚本、不联网。 */
:root {
  --paper: #faf7f1;
  --paper-raised: #fffdf9;
  --ink: #211d18;
  --muted: #6b6257;
  --line: #e4dccd;
  --accent: #8f4a2b;
  --accent-soft: #f2e4d8;
  --code-bg: #f3ede2;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16140f;
    --paper-raised: #1d1a15;
    --ink: #ece5d8;
    --muted: #a89d8c;
    --line: #322c23;
    --accent: #e0a075;
    --accent-soft: #2a2119;
    --code-bg: #241f18;
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
  max-width: 58rem;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: "Songti SC", "Source Han Serif SC", "Noto Serif CJK SC", "SimSun", Georgia, serif;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-style: wavy;
}

code {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Consolas", monospace;
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.12em 0.36em;
  border-radius: 4px;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.86em;
}

/* 顶栏 */
.sitenav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0.9rem 0;
  margin-bottom: 1rem;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.sitenav .brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}

.sitenav nav {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin-left: auto;
  font-size: 0.94rem;
}

.sitenav nav a {
  color: var(--muted);
  text-decoration: none;
}

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

/* 首屏 */
.hero {
  padding: 3rem 0 1rem;
}

.hero h1 {
  font-size: clamp(1.85rem, 4.2vw, 2.9rem);
  margin: 0 0 1.1rem;
  font-weight: 700;
}

.lede {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 44rem;
  margin: 0 0 1.6rem;
}

.actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.button {
  display: inline-block;
  padding: 0.52rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-raised);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  transition: border-color 120ms ease, transform 120ms ease;
}

.button:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  text-decoration: none;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  .button.primary {
    color: #1b1510;
    font-weight: 600;
  }
}

.tiny {
  font-size: 0.85rem;
  color: var(--muted);
}

.note {
  font-size: 0.92rem;
  color: var(--muted);
  border-left: 2px solid var(--accent-soft);
  padding-left: 0.9rem;
  margin: 1rem 0;
}

/* 截图 */
.shot {
  margin: 2.2rem 0 0;
}

figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-raised);
}

figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.55rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.4rem;
  margin-top: 2rem;
}

/* 段落 */
section {
  margin-top: 4.2rem;
  scroll-margin-top: 4rem;
}

section h2 {
  font-size: 1.5rem;
  margin: 0 0 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
}

section h3 {
  font-size: 1.08rem;
  margin: 2rem 0 0.6rem;
}

/* 三样东西 */
table.parts {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

table.parts th,
table.parts td {
  text-align: left;
  padding: 0.75rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.parts th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

table.parts td:first-child {
  white-space: nowrap;
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

/* 步骤 */
ol.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
}

ol.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: 1.1rem;
}

ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

ul.notes {
  padding-left: 1.2rem;
}

ul.notes li {
  margin-bottom: 0.8rem;
}

footer {
  margin-top: 4.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted);
}

footer p {
  margin: 0.4rem 0;
}

@media (max-width: 40rem) {
  body {
    font-size: 16px;
    padding: 0 1.05rem 3.5rem;
  }

  table.parts td:first-child {
    white-space: normal;
  }

  .sitenav nav {
    gap: 0.8rem;
    font-size: 0.88rem;
  }
}
