/* 穿山甲官网 (website/index.html) */
/* Layout: a mountain cross-section (青绿山水 palette) opens the page; the tunnel through it
   is the product. Below it the page reads plainly, one idea per band, set on a stone-cool paper. */
:root {
  --paper: #eef2ee;
  --surface: #f8faf8;
  --ink: #17302a;
  --ink-2: #4b625b;
  --line: #cfdcd6;
  --azure: #22597a;      /* 石青 */
  --malachite: #3c7466;  /* 石绿 */
  --ochre: #b06d28;      /* 赭石: the pangolin and the call to action */
  --ochre-ink: #fffaf3;
  --m3: #bfd3cc;
  --m2: #86ad9f;
  --m1: #4f8072;
  --tunnel: #3a2a1d;
  --scale: #7b4a1c;
  --sky: #e3ece8;
  /* 标题：思源黑体特粗；正文：系统黑体（苹方 / 鸿蒙 / 小米 / 微软雅黑） */
  --f-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --f-body: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --wrap: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1716; --surface: #142220; --ink: #e2ebe7; --ink-2: #9cb2ab; --line: #253833;
    --azure: #74b1d2; --malachite: #79b9a4; --ochre: #d99a56; --ochre-ink: #1b1209;
    --m3: #1b2c29; --m2: #234038; --m1: #2f5a4e; --tunnel: #0b0806; --scale: #8a5525; --sky: #111d1b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1716; --surface: #142220; --ink: #e2ebe7; --ink-2: #9cb2ab; --line: #253833;
  --azure: #74b1d2; --malachite: #79b9a4; --ochre: #d99a56; --ochre-ink: #1b1209;
  --m3: #1b2c29; --m2: #234038; --m1: #2f5a4e; --tunnel: #0b0806; --scale: #8a5525; --sky: #111d1b;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.85;
  letter-spacing: .02em;
  padding-inline: 16px;
}
a { color: var(--azure); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin-inline: auto; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
h2 { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.4; letter-spacing: .02em; }
h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.5; }
p { margin: 0; }
.eyebrow { font-size: .9rem; font-weight: 500; letter-spacing: .06em; color: var(--malachite); }
.lede { color: var(--ink-2); max-width: 38em; font-size: 1.05rem; }

/* header */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  margin-inline: -16px; padding-inline: 16px;
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 1.5rem; padding-block: .7rem; }
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ink); font-family: var(--f-display); font-weight: 700; font-size: 1.3rem; letter-spacing: .06em; }
.brand img { width: 2.1rem; height: 2.1rem; }
.nav { display: flex; gap: 1.4rem; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; gap: .4rem; padding: .7rem 1.3rem; border-radius: 999px;
  font: 500 1rem/1 var(--f-body); text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.btn-main { background: var(--ochre); color: var(--ochre-ink); }
.btn-main:hover { transform: translateY(-1px); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-2); }
.top .btn { padding: .5rem 1rem; font-size: .9rem; }

/* hero: the slogan sits in the sky of the cross-section; on narrow screens the text
   comes first and the scene follows on the same sky */
.hero { margin-inline: -16px; background: var(--sky); display: grid; }
.hero-text { width: 100%; max-width: calc(var(--wrap) + 32px); margin-inline: auto; padding: clamp(2.5rem, 7vw, 4rem) 16px 0; position: relative; z-index: 1; }
.hero-text > * { max-width: 36rem; }
.hero h1 {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(3rem, 13vw, 6.2rem);
  line-height: 1.18;
  letter-spacing: .04em;
  max-width: none;
}
.hero h1 span { display: block; }
.hero h1 .dig { color: var(--ochre); }
.hero .lede { margin-top: 1.5rem; font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--ink); }
.hero .acts { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.scene { margin: 0; overflow: hidden; }
.scene { margin-top: 1rem; }
.scene svg { display: block; width: 100%; height: auto; max-width: 100%; aspect-ratio: 1200 / 470; }
.scene text { font-family: var(--f-body); fill: var(--ink); }
.scene .mono { font-family: var(--f-mono); letter-spacing: .04em; }
@media (min-width: 1100px) {
  .hero > * { grid-area: 1 / 1; }
  .hero-text { align-self: start; padding-top: 2.5rem; }
  .hero h1 { font-size: clamp(4.6rem, 8vw, 6.2rem); }
  .scene { align-self: end; margin-top: 0; }
  .scene svg { height: min(680px, 56.67vw); aspect-ratio: auto; }
}

/* bands */
.band { padding-block: clamp(3.5rem, 8vw, 6rem); border-top: 1px solid var(--line); }
.band-head { display: grid; gap: .9rem; margin-bottom: 2.5rem; }

.peaks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.peak { display: grid; gap: .6rem; align-content: start; min-width: 0; }
.peak svg { width: 4.5rem; height: 2.6rem; }
.peak p { color: var(--ink-2); }

.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.how > div { padding: 1.8rem; display: grid; gap: .6rem; align-content: start; min-width: 0; }
.how > div + div { border-left: 1px solid var(--line); }
.how .tag { font-size: .88rem; font-weight: 500; color: var(--azure); letter-spacing: .06em; }
.how p { color: var(--ink-2); }

.uses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3rem; }
.use { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.use svg { width: 2.6rem; height: 2.6rem; color: var(--malachite); }
.use p { color: var(--ink-2); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; counter-reset: s; }
.steps li { counter-increment: s; display: grid; gap: .5rem; align-content: start; min-width: 0; }
.steps li::before {
  content: counter(s); font-family: var(--f-display); font-weight: 900; font-size: 3rem; line-height: 1; color: var(--ochre);
}
.steps p { color: var(--ink-2); }
.num { font-family: var(--f-mono); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: .05rem .4rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; }
.plat { display: grid; gap: .3rem; padding: 1.3rem 1.4rem; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); background: var(--surface); transition: border-color .15s ease, transform .15s ease; }
.plat:hover { border-color: var(--malachite); transform: translateY(-2px); }
.plat strong { font-size: 1.1rem; }
.plat span { color: var(--ink-2); font-size: .9rem; }
.plat-off { cursor: default; opacity: .7; }
.plat-off:hover { border-color: var(--line); transform: none; }
.plat em { font-style: normal; font-family: var(--f-mono); font-size: .78rem; color: var(--malachite); margin-top: .4rem; }
.ver { margin-top: 1.2rem; font-size: .9rem; color: var(--ink-2); }

.faq { display: grid; max-width: 48rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding-block: 1.1rem; font-weight: 500; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-mono); color: var(--ochre); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-2); padding-bottom: 1.2rem; max-width: 40em; }

.closing { text-align: left; display: grid; gap: 1.4rem; justify-items: start; }
.closing h2 { font-size: clamp(2rem, 5.5vw, 3.4rem); font-weight: 900; letter-spacing: .04em; }

footer { border-top: 1px solid var(--line); padding-block: 2rem 3rem; color: var(--ink-2); font-size: .88rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; }

/* security: two rules on the left, the device's own view on the right */
.safe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: 3rem; align-items: center; }
.rules { display: grid; gap: 1.8rem; }
.rule { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.rule svg { width: 2.6rem; height: 2.6rem; color: var(--azure); }
.rule p { color: var(--ink-2); }
.rule p + p { margin-top: .5rem; }
.shot { margin: 0; display: grid; gap: .8rem; justify-items: center; min-width: 0; }
.shot img { width: 100%; max-width: 19rem; height: auto; border-radius: 2rem; border: 7px solid var(--ink); background: #fff; box-shadow: 0 24px 48px -24px color-mix(in oklab, var(--ink) 45%, transparent); }
.shot figcaption { font-size: .85rem; color: var(--ink-2); text-align: center; max-width: 19rem; }
/* guide.html */
.page-head { padding-block: clamp(2.5rem, 7vw, 4rem) 2rem; display: grid; gap: 1rem; }
.page-head h1 { font-family: var(--f-display); font-weight: 900; font-size: clamp(2.2rem, 7vw, 3.4rem); letter-spacing: .04em; line-height: 1.2; }
.toc { display: flex; flex-wrap: wrap; gap: .6rem; }
.toc a { text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .9rem; font-size: .92rem; background: var(--surface); }
.toc a:hover { border-color: var(--malachite); }
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1.2rem; }
.platform { display: grid; gap: .9rem; align-content: start; padding: 1.4rem 1.5rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); min-width: 0; scroll-margin-top: 5rem; }
.platform header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.platform h3 { font-size: 1.25rem; }
.platform header a { font-size: .9rem; }
.how-to { margin: 0; padding-left: 1.3em; display: grid; gap: .55rem; color: var(--ink-2); }
.how-to > li { min-width: 0; }
code { font-family: var(--f-mono); font-size: .88em; overflow-wrap: anywhere; }
.how-to li::marker { color: var(--ochre); font-weight: 700; }
.how-to b, .use-steps b { color: var(--ink); font-weight: 600; }
.note { font-size: .9rem; color: var(--ink-2); border-left: 3px solid var(--ochre); padding-left: .8rem; }
.cmd { margin: 0; overflow-x: auto; font: .85rem/1.7 var(--f-mono); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; color: var(--ink); }
.use-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; counter-reset: u; max-width: 46rem; }
.use-steps li { counter-increment: u; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: .3rem 1rem; }
.use-steps li::before { content: counter(u); grid-row: span 2; font-family: var(--f-display); font-weight: 900; font-size: 2.2rem; line-height: 1.1; color: var(--ochre); }
.use-steps p { color: var(--ink-2); }
.more { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 2rem 3rem; }
.more > div { display: grid; gap: .4rem; align-content: start; min-width: 0; }
.more p { color: var(--ink-2); }

@media (max-width: 760px) {
  .safe { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .nav { display: none; }
  .top .btn { margin-left: auto; }
  .peaks, .steps { grid-template-columns: minmax(0, 1fr); }
  .how { grid-template-columns: minmax(0, 1fr); }
  .how > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .uses { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .plat { transition: none; }
  .btn-main:hover, .plat:hover { transform: none; }
}

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
