/* AInbox 官网样式：一个文件，没有构建步骤，没有外部字体和脚本。 */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-soft: #f3f8f7;
  --card: #ffffff;
  --text: #10201f;
  --muted: #53635f;
  --line: #d8e4e2;
  --accent: #0f7a78;
  --accent-soft: #e2f3f0;
  --accent-ink: #0b5f5d;
  --btn-bg: #0f7a78;
  --btn-bg-hover: #0b6362;
  --btn-text: #ffffff;
  --code-bg: #0f1d1d;
  --code-text: #d7ece8;
  --shadow: 0 1px 2px rgb(16 40 38 / 6%), 0 10px 28px rgb(16 40 38 / 7%);
  --radius: 14px;
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "PingFang SC", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #091110;
    --bg-soft: #0e1918;
    --card: #101c1b;
    --text: #e6f1ef;
    --muted: #98aeaa;
    --line: #213432;
    --accent: #4cc7b9;
    --accent-soft: #123532;
    --accent-ink: #7be0d3;
    --btn-bg: #4cc7b9;
    --btn-bg-hover: #67d6c9;
    --btn-text: #04201e;
    --code-bg: #0b1514;
    --code-text: #cfe6e2;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 28px rgb(0 0 0 / 28%);
  }
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.75 var(--font);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--accent-ink);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

code,
pre {
  font-family: var(--mono);
}

code {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.05em 0.4em;
  font-size: 0.9em;
}

.container {
  width: min(var(--max), 100% - 2.5rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--btn-bg);
  color: var(--btn-text);
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* 顶栏 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.site-header nav a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-header nav a:not(.btn):hover {
  color: var(--text);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.5rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.btn:hover {
  background: var(--btn-bg-hover);
  text-decoration: none;
}

.btn.small {
  padding: 0.35rem 1rem;
  font-size: 0.92rem;
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn.ghost:hover {
  background: var(--bg-soft);
}

/* 通用区块 */
section {
  padding: 4.5rem 0;
  scroll-margin-top: 64px;
}

section.soft {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

.eyebrow {
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.section-head {
  max-width: 44rem;
  margin-bottom: 2.4rem;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.15rem);
  margin-top: 0.4rem;
}

.section-head p {
  color: var(--muted);
  margin-top: 0.8rem;
}

.section-head .eyebrow {
  color: var(--accent-ink);
  margin-top: 0;
}

/* 首屏 */
.hero {
  padding: 4rem 0 4.5rem;
  background: var(--bg);
  background:
    radial-gradient(60rem 28rem at 12% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  margin: 0.6rem 0 1.1rem;
}

.hero .lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 34rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.8rem 0 1rem;
}

.hero-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-note {
  margin-top: 0.7rem;
  font-size: 0.92rem;
  color: var(--accent-ink);
}

.stack {
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.caption {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0.6rem 0.2rem 0;
}

/* 聊天示意 */
.chat {
  padding: 1rem;
  display: grid;
  gap: 0.6rem;
}

.msg {
  max-width: 92%;
  padding: 0.6rem 0.85rem;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.msg.me {
  justify-self: end;
  background: var(--btn-bg);
  color: var(--btn-text);
  border-bottom-right-radius: 4px;
  font-family: var(--mono);
  font-size: 0.8rem;
}

.msg.bot {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}

pre.tree {
  margin: 0;
  padding: 1rem 1.1rem;
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius);
  font-size: 0.84rem;
  line-height: 1.65;
  overflow-x: auto;
}

/* 三个数字 */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 1rem;
  margin-top: 3rem;
}

.fact {
  padding: 1.2rem 1.4rem;
}

.fact b {
  display: block;
  font-size: 2rem;
  line-height: 1.2;
  color: var(--accent-ink);
}

.fact span {
  color: var(--muted);
  font-size: 0.93rem;
}

/* 功能卡片 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr));
  gap: 1.1rem;
}

.feature {
  padding: 1.4rem;
}

.feature svg {
  width: 26px;
  height: 26px;
  color: var(--accent-ink);
  margin-bottom: 0.8rem;
}

.feature h3 {
  font-size: 1.08rem;
  margin-bottom: 0.45rem;
}

.feature p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* 流水线 */
.pipeline {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 0;
  margin: 0 0 1.2rem;
}

.pipeline li {
  counter-increment: step;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.95rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.95rem;
}

.pipeline li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.pipeline li.ai {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.pipeline li.ai::before {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--btn-text);
}

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

.legend .dot {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 0.4rem;
}

/* 连接器 */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
}

.chips li {
  padding: 0.4rem 1rem;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  font-size: 0.95rem;
}

.note {
  color: var(--muted);
  max-width: 46rem;
}

.legend + .note {
  margin-top: 1rem;
}

/* 下载 */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1.2rem;
}

.dl-card {
  padding: 1.6rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.dl-card[data-match] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), var(--shadow);
}

.dl-card h3 {
  font-size: 1.25rem;
}

.dl-card .sub {
  color: var(--muted);
  font-size: 0.92rem;
}

.dl-card .file {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.badge {
  position: absolute;
  top: -0.8rem;
  right: 1.2rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  border-radius: 999px;
  padding: 0.1rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.dl-card .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font-size: 0.92rem;
}

details.hash summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.88rem;
}

details.hash code {
  display: block;
  margin-top: 0.4rem;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}

.dl-notes {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.6rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.platforms {
  margin-top: 2rem;
  padding: 1.1rem 1.4rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.platforms strong {
  color: var(--text);
}

/* 常见问题 */
.faq {
  display: grid;
  gap: 0.7rem;
  max-width: 50rem;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 1.2rem;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 0;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--accent-ink);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.4;
}

.faq details[open] summary::after {
  content: "−";
}

.faq .answer {
  padding-bottom: 1.1rem;
  color: var(--muted);
}

.faq .answer p + p,
.faq .answer p + pre {
  margin-top: 0.7rem;
}

.faq pre {
  margin: 0;
  padding: 0.7rem 0.9rem;
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 10px;
  font-size: 0.82rem;
  overflow-x: auto;
}

/* 文章页（更新日志、隐私） */
.page {
  padding: 3.5rem 0 5rem;
}

.prose {
  max-width: 46rem;
}

.prose h1 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  margin-bottom: 0.6rem;
}

.prose h1 + p {
  margin-bottom: 1.6rem;
}

.prose h2 {
  font-size: 1.35rem;
  margin: 2.4rem 0 0.7rem;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose p + p {
  margin-top: 0.8rem;
}

.prose ul {
  padding-left: 1.3rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose strong {
  color: var(--text);
}

.release {
  padding: 1.4rem 0 1.6rem;
  border-top: 1px solid var(--line);
}

.release header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.prose .release h2 {
  margin: 0;
}

.release time {
  color: var(--muted);
  font-size: 0.92rem;
}

.release ul {
  margin: 0.8rem 0;
}

.release-downloads {
  font-size: 0.93rem;
}

/* 页脚 */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem 0 3rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer .container {
  display: grid;
  gap: 0.8rem;
}

.site-footer nav {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--text);
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.2rem;
  }

  section {
    padding: 3.4rem 0;
  }
}

@media (max-width: 640px) {
  .site-header nav a:not(.btn) {
    display: none;
  }
}
