/* Ashlar website - single stylesheet shared by / and /zh/ */
:root {
  --bg: #f6f3ee;
  --bg-2: #ede8e0;
  --ink: #1d1a17;
  --ink-2: #4a443d;
  --muted: #7a726a;
  --line: #d9d2c7;
  --card: #ffffff;
  --accent: #b5561d;
  --accent-ink: #ffffff;
  --accent-soft: #f4e3d4;
  --code-bg: #24211e;
  --code-ink: #efe9df;
  --max: 1080px;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171513;
    --bg-2: #1f1c19;
    --ink: #efe9df;
    --ink-2: #cfc6b8;
    --muted: #978d80;
    --line: #34302b;
    --card: #211e1a;
    --accent: #e0803f;
    --accent-ink: #171513;
    --accent-soft: #3a2a1d;
    --code-bg: #0f0e0c;
    --code-ink: #e6dfd3;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, kbd { font-family: var(--mono); }
code { font-size: 0.92em; background: var(--bg-2); padding: 0.1em 0.4em; border-radius: 5px; }
pre {
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 16px 18px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0;
}
pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h2 { font-size: 30px; margin-bottom: 8px; }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
section { padding: 64px 0; }
section + section { border-top: 1px solid var(--line); }
.lead { color: var(--ink-2); font-size: 18px; max-width: 720px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 18px; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav nav { display: flex; align-items: center; gap: 18px; margin-left: auto; font-size: 15px; }
.nav nav a { color: var(--ink-2); }
.nav nav a:hover { color: var(--ink); text-decoration: none; }
.lang { font-size: 14px; line-height: 1; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2) !important; }
@media (max-width: 720px) { .nav nav a:not(.lang) { display: none; } }

/* hero */
.hero { padding: 72px 0 40px; }
.hero h1 { font-size: 52px; font-weight: 800; margin-bottom: 14px; }
.hero .lead { font-size: 21px; margin-bottom: 26px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; }
.btn {
  display: inline-block; padding: 12px 20px; border-radius: 10px; font-weight: 600;
  border: 1px solid var(--line); color: var(--ink); background: var(--card);
}
.btn:hover { text-decoration: none; border-color: var(--ink-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.badges { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; color: var(--muted); }
.badges span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 7px; vertical-align: 2px; }
.showcase { margin: 36px 0 0; }
.showcase img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.showcase figcaption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 10px; }
@media (max-width: 720px) { .hero h1 { font-size: 38px; } .hero .lead { font-size: 18px; } }

/* grids and cards */
.grid { display: grid; gap: 16px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid.three { grid-template-columns: 1fr; } .grid.two { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-bottom: 6px; }
.card p:last-child { margin-bottom: 0; }
.step { position: relative; padding-left: 52px; }
.step .n {
  position: absolute; left: 18px; top: 22px; min-width: 26px; height: 24px; padding: 0 6px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 12px; align-items: center; }
.flow .arrow { color: var(--muted); font-size: 22px; text-align: center; }
@media (max-width: 860px) { .flow { grid-template-columns: 1fr; } .flow .arrow { transform: rotate(90deg); } }

/* tools */
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 860px) { .tools { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tools { grid-template-columns: 1fr; } }
.tool { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.tool code { display: inline-block; margin-bottom: 4px; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.tool p { margin: 0; font-size: 14.5px; color: var(--ink-2); }

/* tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tabs button {
  font: inherit; font-size: 14px; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
}
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.panel[hidden] { display: none; }
.panel p { margin-top: 10px; }

/* misc */
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
ul.checks { list-style: none; padding: 0; margin: 0; }
ul.checks li { padding: 6px 0 6px 26px; position: relative; }
ul.checks li::before { content: "\2713"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }
.chat { background: var(--code-bg); color: var(--code-ink); border-radius: var(--radius); padding: 16px 18px; font-family: var(--mono); font-size: 13.5px; line-height: 1.7; }
.chat .tag { color: #e6b422; }
.chat .dim { color: #9a9083; }
footer { border-top: 1px solid var(--line); padding: 36px 0; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
footer a { color: var(--ink-2); }
