/* ==========================================================================
   AllMyMind - Design System
   Editorial 路 organic 路 technical. No external fonts or CDNs.
   ========================================================================== */

:root {
  /* palette */
  --ink:        #0d120e;
  --ink-soft:   #2a332c;
  --muted:      #5f6b62;
  --forest-900: #08170f;
  --forest-800: #0e2418;
  --forest-700: #14311f;
  --forest-600: #1d4229;
  --moss:       #2f6446;
  --moss-light: #4c8563;
  --sage:       #8fb49b;
  --sage-pale:  #c7dccd;
  --parchment:  #f7f3e8;
  --paper:      #fcfaf4;
  --paper-2:    #f2ede0;
  --gold:       #b98f45;
  --gold-soft:  #d8bd8a;
  --rust:       #a2522f;
  --line:       rgba(13, 18, 14, 0.12);
  --line-soft:  rgba(13, 18, 14, 0.07);
  --line-dark:  rgba(247, 243, 232, 0.16);

  /* type */
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong",
           "SimSun", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas,
          "Liberation Mono", "Courier New", monospace;

  /* metrics */
  --wrap: 1140px;
  --wrap-narrow: 760px;
  --radius: 3px;
  --nav-h: 68px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.75;
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 { margin: 0; font-family: var(--serif); font-weight: 600; line-height: 1.24; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
::selection { background: var(--sage); color: var(--forest-900); }

/* paper grain */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: 0.035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.wrap-narrow { width: 100%; max-width: var(--wrap-narrow); margin: 0 auto; padding: 0 28px; }
.section { padding: 104px 0; position: relative; }
.section--tight { padding: 72px 0; }
.section--paper { background: var(--paper-2); }
.section--dark { background: var(--forest-900); color: var(--parchment); }
.section--dark .eyebrow { color: var(--gold-soft); }
.section--dark .lede { color: rgba(247, 243, 232, 0.72); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- eyebrow / headings ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--moss); font-weight: 600; margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .55; }
.eyebrow .num { font-variant-numeric: tabular-nums; opacity: .65; }

.h-display { font-size: clamp(2.5rem, 6vw, 4.35rem); line-height: 1.06; letter-spacing: -0.025em; }
.h-section { font-size: clamp(1.75rem, 3.4vw, 2.65rem); line-height: 1.18; letter-spacing: -0.02em; }
.h-card { font-size: 1.22rem; line-height: 1.35; }
.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.18rem); line-height: 1.78;
  color: var(--muted); max-width: 62ch;
}
.serif { font-family: var(--serif); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  background: rgba(252, 250, 244, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav__inner { height: 100%; display: flex; align-items: center; gap: 34px; }
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand__mark { width: 27px; height: 27px; flex-shrink: 0; }
.brand__zh { font-family: var(--serif); font-size: 1.06rem; font-weight: 600; letter-spacing: .04em; }
.brand__en {
  font-size: 9.5px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--muted); margin-left: 2px; transform: translateY(1px);
}
.nav__links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav__link {
  font-size: 14.5px; color: var(--ink-soft); position: relative; padding: 6px 0;
  transition: color .18s ease;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--moss); transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav__link:hover { color: var(--forest-700); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--forest-700); font-weight: 500; }
.nav__actions { display: flex; align-items: center; gap: 14px; margin-left: 8px; }

.lang {
  display: inline-flex; align-items: center; border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden; font-size: 12px; letter-spacing: .06em;
}
.lang a { padding: 4px 11px; color: var(--muted); transition: all .16s ease; }
.lang a.is-on,
.lang span.is-on { padding: 4px 11px; background: var(--forest-700); color: var(--parchment); }

.nav__toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14.5px; font-weight: 500; letter-spacing: .015em; cursor: pointer;
  transition: transform .18s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--forest-700); color: var(--parchment); box-shadow: 0 1px 2px rgba(8,23,15,.2); }
.btn--primary:hover { background: var(--forest-600); box-shadow: 0 6px 18px -6px rgba(8,23,15,.45); }
.btn--ghost { border-color: var(--line); color: var(--ink-soft); background: transparent; }
.btn--ghost:hover { border-color: var(--moss); color: var(--forest-700); background: rgba(47,100,70,.04); }
.btn--gold { background: var(--gold); color: var(--forest-900); }
.btn--gold:hover { background: #c9a058; }
.btn--sm { padding: 9px 18px; font-size: 13.5px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px;
  color: var(--forest-700); font-weight: 500;
}
.link-arrow svg { transition: transform .2s ease; }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 88px; background: var(--paper); }
.hero__bg { position: absolute; inset: 0; pointer-events: none; opacity: .55; }
.hero__inner { position: relative; z-index: 1; }
.hero__title { font-size: clamp(2.9rem, 7.2vw, 5.4rem); line-height: 1.02; letter-spacing: -0.035em; }
.hero__title .thin { font-weight: 300; color: var(--moss); }
.hero__sub {
  margin-top: 26px; font-family: var(--serif); font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  color: var(--ink-soft); max-width: 30ch; line-height: 1.6;
}
.hero__desc { margin-top: 22px; max-width: 56ch; color: var(--muted); font-size: 1.02rem; }
.hero__cta { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero__meta { margin-top: 54px; display: flex; flex-wrap: wrap; gap: 30px 44px; align-items: center; }
.hero__meta-item { display: flex; flex-direction: column; gap: 2px; }
.hero__meta-k { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.hero__meta-v { font-family: var(--serif); font-size: 1rem; color: var(--ink-soft); }

.hero--split .hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 70px; align-items: center;
}

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 26px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  position: relative; padding: 32px 30px 30px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .28s cubic-bezier(.2,.7,.3,1), box-shadow .28s ease, border-color .28s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(47,100,70,.34); box-shadow: 0 18px 40px -28px rgba(8,23,15,.5); }
.card__num {
  font-family: var(--serif); font-size: 12px; letter-spacing: .18em;
  color: var(--gold); margin-bottom: 18px;
}
.card__title { font-size: 1.16rem; margin-bottom: 12px; }
.card__text { color: var(--muted); font-size: 14.8px; line-height: 1.72; }
.card--dark { background: var(--forest-800); border-color: var(--line-dark); color: var(--parchment); }
.card--dark .card__text { color: rgba(247,243,232,.66); }

.icon-badge {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; margin-bottom: 20px;
  color: var(--moss);
}
.icon-badge svg { width: 19px; height: 19px; }

/* ---------- stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 34px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat__v { font-family: var(--serif); font-size: 2.05rem; line-height: 1; letter-spacing: -.02em; }
.stat__k { margin-top: 10px; font-size: 12.5px; color: var(--muted); letter-spacing: .04em; }
.section--dark .stats { border-color: var(--line-dark); }
.section--dark .stat { border-color: var(--line-dark); }
.section--dark .stat__k { color: rgba(247,243,232,.6); }

/* ---------- code ---------- */
.code {
  position: relative; background: var(--forest-900); color: #e8efe6;
  border-radius: var(--radius); padding: 22px 24px; overflow-x: auto;
  font-family: var(--mono); font-size: 13.4px; line-height: 1.85;
  white-space: pre;
  border: 1px solid rgba(255,255,255,.06);
}
.code .c { color: #7f9b85; }
.code .k { color: var(--gold-soft); }
.code .s { color: #a8c9ae; }
.code__label {
  display: inline-block; margin-bottom: 10px; font-family: var(--sans);
  font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--sage);
}
.code-inline {
  font-family: var(--mono); font-size: .88em; background: rgba(47,100,70,.09);
  border: 1px solid rgba(47,100,70,.14); border-radius: 3px; padding: 1px 6px;
  color: var(--forest-700); white-space: nowrap;
}

/* ---------- prose ---------- */
.prose { font-size: 16.6px; line-height: 1.86; color: var(--ink-soft); }
.prose > * + * { margin-top: 1.35em; }
.prose h2 { font-size: 1.62rem; margin-top: 2.6em; color: var(--ink); }
.prose h3 { font-size: 1.24rem; margin-top: 2.1em; color: var(--ink); }
.prose p { color: var(--ink-soft); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--moss); border-bottom: 1px solid rgba(47,100,70,.3); }
.prose a:hover { border-bottom-color: var(--moss); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .5em; }
.prose blockquote {
  margin-left: 0; margin-right: 0; padding: 4px 0 4px 26px;
  border-left: 2px solid var(--gold); font-family: var(--serif);
  font-size: 1.12rem; color: var(--ink-soft); font-style: italic;
}
.prose code { font-family: var(--mono); font-size: .87em; background: rgba(47,100,70,.09); padding: 2px 6px; border-radius: 3px; }
.prose pre { background: var(--forest-900); color: #e8efe6; padding: 20px 24px; border-radius: var(--radius); overflow-x: auto; }
.prose pre code { background: none; padding: 0; color: inherit; font-size: 13.4px; line-height: 1.85; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }

/* ---------- page head ---------- */
.page-head { padding: 74px 0 52px; border-bottom: 1px solid var(--line); background: var(--paper); }
.page-head__crumb { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.page-head__crumb a:hover { color: var(--forest-700); }
.page-head__title { font-size: clamp(2.1rem, 4.6vw, 3.3rem); letter-spacing: -.028em; }
.page-head__desc { margin-top: 20px; max-width: 60ch; color: var(--muted); font-size: 1.04rem; }

/* ---------- timeline (changelog) ---------- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 46px 0; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -30px; top: 7px; width: 13px; height: 13px;
  border-radius: 50%; background: var(--paper); border: 1px solid var(--moss);
  box-shadow: 0 0 0 4px var(--paper);
}
.tl-item--now::before { background: var(--moss); }
.tl-date { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.tl-ver { font-family: var(--serif); font-size: 1.24rem; margin-bottom: 10px; }
.tl-list { list-style: none; }
.tl-list li { position: relative; padding-left: 18px; color: var(--ink-soft); font-size: 15px; margin-top: 6px; }
.tl-list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 1px; background: var(--gold); }

/* ---------- blog ---------- */
.post-list { border-top: 1px solid var(--line); }
.post-row {
  display: grid; grid-template-columns: 150px minmax(0,1fr) auto; gap: 30px;
  align-items: baseline; padding: 30px 4px; border-bottom: 1px solid var(--line);
  transition: background .2s ease, padding .2s ease;
}
.post-row:hover { background: rgba(47,100,70,.035); padding-left: 12px; padding-right: 12px; }
.post-row__date { font-size: 12.5px; letter-spacing: .08em; color: var(--muted); font-variant-numeric: tabular-nums; }
.post-row__title { font-family: var(--serif); font-size: 1.28rem; line-height: 1.4; }
.post-row__excerpt { margin-top: 8px; color: var(--muted); font-size: 14.4px; max-width: 62ch; }
.post-row__arrow { color: var(--moss); opacity: 0; transition: opacity .2s, transform .2s; }
.post-row:hover .post-row__arrow { opacity: 1; transform: translateX(4px); }

.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tag {
  font-size: 11.5px; letter-spacing: .06em; padding: 3px 10px; border-radius: 999px;
  background: rgba(47,100,70,.08); color: var(--moss);
}

/* ---------- footer ---------- */
.footer { background: var(--forest-900); color: rgba(247,243,232,.72); padding: 68px 0 34px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { color: var(--parchment); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 18px; font-family: var(--sans); font-weight: 600; }
.footer__links { display: flex; flex-direction: column; gap: 11px; font-size: 14.4px; }
.footer__links a:hover { color: var(--parchment); }
.footer__brand .brand__zh, .footer__brand .brand__en { color: var(--parchment); }
.footer__brand .brand__en { color: rgba(247,243,232,.5); }
.footer__tagline { margin-top: 18px; font-size: 13.8px; line-height: 1.7; max-width: 32ch; color: rgba(247,243,232,.55); }
.footer__qr { width: 116px; height: 116px; border-radius: 3px; border: 4px solid var(--parchment); margin-top: 4px; }
.footer__bottom {
  margin-top: 54px; padding-top: 22px; border-top: 1px solid var(--line-dark);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-size: 12.8px; color: rgba(247,243,232,.45);
}
.footer__bottom a:hover { color: var(--parchment); }

/* ---------- forms ---------- */
.field { margin-bottom: 18px; }
.field__label { display: block; font-size: 12.5px; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; }
.input, .textarea {
  width: 100%; padding: 13px 16px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 15px; transition: border-color .18s ease, box-shadow .18s ease;
}
.input:focus, .textarea:focus {
  outline: none; border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(47,100,70,.1);
}
.textarea { min-height: 130px; resize: vertical; line-height: 1.7; }
.form-note { font-size: 13px; color: var(--muted); margin-top: 14px; }
.alert {
  padding: 12px 16px; border-radius: var(--radius); font-size: 14px;
  border: 1px solid; margin-bottom: 18px;
}
.alert--err { background: rgba(162,82,47,.07); border-color: rgba(162,82,47,.25); color: var(--rust); }
.alert--ok { background: rgba(47,100,70,.07); border-color: rgba(47,100,70,.25); color: var(--moss); }

.auth { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 60px 24px; }
.auth__card { width: 100%; max-width: 430px; padding: 44px 40px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.auth__title { font-size: 1.7rem; margin-bottom: 8px; }
.auth__sub { color: var(--muted); font-size: 14.4px; margin-bottom: 30px; }
.auth__switch { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-soft); font-size: 14px; color: var(--muted); text-align: center; }
.auth__switch a { color: var(--moss); }

/* ---------- messages ---------- */
.msg-form { padding: 28px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); }
.msg-list { margin-top: 46px; }
.msg {
  padding: 26px 0; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 18px;
}
.msg__avatar {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--forest-700); color: var(--parchment);
  font-family: var(--serif); font-size: 1.05rem;
}
.msg__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.msg__name { font-weight: 600; font-size: 15px; }
.msg__time { font-size: 12.2px; color: var(--muted); letter-spacing: .04em; }
.msg__body { color: var(--ink-soft); font-size: 15.2px; line-height: 1.78; white-space: pre-wrap; word-break: break-word; }
.empty { padding: 56px 0; text-align: center; color: var(--muted); font-family: var(--serif); font-size: 1.05rem; }

/* ---------- architecture diagram ---------- */
.diagram { background: var(--forest-900); border-radius: var(--radius); padding: 34px; overflow-x: auto; }
.diagram svg { min-width: 620px; width: 100%; height: auto; }

/* ---------- language helper ---------- */
[data-lang="zh"] .en-only, [data-lang="en"] .zh-only { display: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero--split .hero__grid { grid-template-columns: 1fr; gap: 44px; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .nav__links { display: none; }
  .nav__toggle { display: block; margin-left: auto; }
  .nav__actions { margin-left: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 1px solid var(--line); }
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .section { padding: 72px 0; }
  .wrap, .wrap-narrow { padding: 0 20px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .post-row { grid-template-columns: 1fr; gap: 8px; }
  .post-row__arrow { display: none; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 56px; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-left: 0 !important; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: 0; }
  .auth__card { padding: 34px 26px; }
  .msg { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- motion ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- docs toc / faq ---------- */
.docs-toc__link {
  font-size: 14px; color: var(--muted); padding: 4px 0 4px 12px;
  border-left: 1px solid var(--line); transition: color .16s ease, border-color .16s ease;
}
.docs-toc__link:hover { color: var(--forest-700); }
.docs-toc__link.is-on { color: var(--forest-700); border-left-color: var(--moss); font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; float: right; color: var(--moss); font-family: var(--sans);
  transition: transform .2s ease;
}
.faq[open] summary::after { content: "\2013"; }
.faq summary:hover { color: var(--forest-700); }
.docs-body section { scroll-margin-top: 90px; }
@media (max-width: 860px) {
  .docs-toc { display: none !important; }
}

/* ---------- page layouts ---------- */
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 40px; align-items: center; }
.hero__art { position: relative; width: 100%; max-width: 520px; margin-left: auto; aspect-ratio: 1 / 1; }
.hero__art-svg { width: 100%; height: 100%; display: block; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; align-items: center; }
.docs-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 64px; align-items: start; }
.docs-toc { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 11px; }

@media (max-width: 1220px) {
  .nav__links { gap: 15px; }
  .nav__link { font-size: 14px; }
}
@media (max-width: 1080px) {
  .nav__links { gap: 11px; }
  .nav__link { font-size: 13.5px; }
  .brand__en { display: none; }
}
@media (max-width: 980px) {
  .hero__grid, .split { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero__art { margin: 6px auto 0; max-width: 340px; }
  .nav__actions .btn { display: none; }
}
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- mobile nav ---------- */
@media (max-width: 980px) {
  body.nav-open .nav__links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 18px 28px 22px; box-shadow: 0 20px 40px -30px rgba(8,23,15,.6);
  }
  body.nav-open .nav__link { padding: 10px 0; font-size: 16px; width: 100%; }
}

/* ==========================================================================
   Forest scene - the hero animation. Grass -> shrubs -> trees, then a slow
   breath, then it grows again. Pure CSS; stops for reduced motion.
   ========================================================================== */

.hero__art {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  aspect-ratio: 720 / 620;
  border-radius: 8px;
  overflow: hidden;
  background: #f2efdd;
  box-shadow: 0 30px 70px -46px rgba(8, 23, 15, .75), 0 2px 8px rgba(8, 23, 15, .06);
}
.forest { width: 100%; height: 100%; display: block; }

.f-trunk, .f-canopy, .f-canopy-lit, .f-shrub, .f-grass {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.f-trunk {
  animation: fGrowY 17s cubic-bezier(.24, .72, .26, 1) infinite both;
  animation-delay: var(--d, 3s);
}
.f-canopy {
  animation: fPop 17s cubic-bezier(.2, .8, .3, 1) infinite both;
  animation-delay: calc(var(--d, 3s) + 1.15s);
  transform-origin: 50% 62%;
}
.f-canopy-lit {
  animation: fPop 17s cubic-bezier(.2, .8, .3, 1) infinite both;
  animation-delay: calc(var(--d, 3s) + 1.3s);
  transform-origin: 50% 62%;
}
.f-shrub {
  animation: fGrowY 17s cubic-bezier(.24, .72, .26, 1) infinite both;
  animation-delay: var(--d, 2s);
}
.f-grass {
  animation: fGrowY 17s cubic-bezier(.24, .72, .26, 1) infinite both;
  animation-delay: var(--d, 1s);
}

@keyframes fGrowY {
  0%   { transform: scaleY(.02); opacity: 0; }
  5%   { opacity: 1; }
  26%  { transform: scaleY(1); }
  86%  { transform: scaleY(1); opacity: 1; }
  95%  { transform: scaleY(1); opacity: 0; }
  100% { transform: scaleY(.02); opacity: 0; }
}

@keyframes fPop {
  0%   { transform: scale(.35) translateY(6px); opacity: 0; }
  9%   { opacity: 1; }
  30%  { transform: scale(1.05) translateY(0); }
  40%  { transform: scale(1); }
  86%  { transform: scale(1); opacity: 1; }
  95%  { opacity: 0; }
  100% { transform: scale(.35) translateY(6px); opacity: 0; }
}

.f-layer-grass {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: fSway 6.5s ease-in-out infinite alternate;
}
@keyframes fSway {
  from { transform: rotate(-.7deg); }
  to   { transform: rotate(.7deg); }
}

.f-rays { animation: fRays 11s ease-in-out infinite alternate; }
@keyframes fRays {
  from { opacity: .35; }
  to   { opacity: .72; }
}

.f-leaf {
  transform-box: fill-box;
  animation: fLeaf 13s linear infinite;
  animation-delay: var(--d, 0s);
}
@keyframes fLeaf {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  10%  { opacity: .75; }
  75%  { opacity: .75; }
  100% { transform: translate(48px, 400px) rotate(240deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .f-trunk, .f-canopy, .f-canopy-lit, .f-shrub, .f-grass,
  .f-layer-grass, .f-rays, .f-leaf { animation: none !important; }
  .f-trunk, .f-canopy, .f-canopy-lit, .f-shrub, .f-grass { opacity: 1 !important; transform: none !important; }
  .f-leaf { display: none; }
}

@media (max-width: 980px) {
  .hero__art { margin: 10px auto 0; max-width: 420px; }
}
@media (max-width: 680px) {
  .hero__art { max-width: 100%; border-radius: 6px; }
}

/* ---------- data table ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 14.6px; }
.data-table th {
  text-align: left; font-weight: 600; font-size: 11.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--line);
}
.data-table td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.data-table td:first-child { font-family: var(--mono); font-size: 13.2px; color: var(--forest-700); white-space: nowrap; }

/* ---------- download ---------- */
.dl-card {
  border: 1px solid var(--line); border-radius: 6px; background: var(--paper);
  padding: 34px 36px 28px; box-shadow: 0 30px 60px -55px rgba(8,23,15,.6);
}
.dl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.dl-ver { font-family: var(--serif); font-size: 2.1rem; line-height: 1; letter-spacing: -.02em; }
.dl-meta { margin-top: 8px; font-size: 12.8px; letter-spacing: .05em; color: var(--muted); }
.dl-badge {
  font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap; margin-top: 6px;
}
.dl-badge--ok { background: rgba(47,100,70,.1); color: var(--moss); }
.dl-badge--pending { background: rgba(185,143,69,.12); color: #7a5a22; }
.dl-table { width: 100%; border-collapse: collapse; font-size: 14.4px; }
.dl-table th {
  text-align: left; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; padding: 0 16px 10px 0; border-bottom: 1px solid var(--line);
}
.dl-table td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.dl-table tr:last-child td { border-bottom: 0; }
.dl-name { font-weight: 500; }
.dl-file { font-family: var(--mono); font-size: 12.2px; color: var(--muted); margin-top: 3px; }
.dl-hint { font-size: 12.6px; color: var(--muted); margin-top: 5px; }
.dl-size { white-space: nowrap; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.dl-sha code { font-size: 11.8px; color: var(--muted); }
.dl-act { text-align: right; white-space: nowrap; }
.dl-pending { font-size: 12.5px; color: var(--muted); }
.dl-reqs { list-style: none; margin-top: 16px; }
.dl-reqs li { position: relative; padding-left: 18px; color: var(--ink-soft); font-size: 15px; margin-top: 8px; }
.dl-reqs li::before { content: ""; position: absolute; left: 0; top: .68em; width: 6px; height: 1px; background: var(--gold); }

/* ---------- legal ---------- */
.legal-summary {
  border-left: 2px solid var(--gold); padding: 6px 0 6px 24px;
}
.legal-summary__k { font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.legal-summary__v { margin-top: 8px; font-family: var(--serif); font-size: 1.32rem; line-height: 1.5; }
.legal-list li { margin-top: 10px; }
.legal-note { padding: 26px 28px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 4px; }
.legal-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 22px 26px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper);
}
.legal-cta span { font-family: var(--serif); font-size: 1.08rem; }
.legal-status {
  padding: 26px 28px; border-radius: 4px;
  background: rgba(185,143,69,.08); border: 1px solid rgba(185,143,69,.3);
}
.legal-status__k { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #8a6a2e; }
.legal-status__t { font-family: var(--serif); font-size: 1.3rem; margin-top: 8px; color: #6b5220; }
.legal-status__b { margin-top: 12px; color: var(--ink-soft); font-size: 15px; line-height: 1.8; }
.footer__stat {
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  color: rgba(247,243,232,.55);
}
.footer__k {
  display: inline-block; min-width: 34px; margin-right: 8px;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(247,243,232,.38); vertical-align: 1px;
}
@media (max-width: 680px) {
  .dl-card { padding: 26px 20px 20px; }
  .dl-table th:nth-child(3), .dl-table td:nth-child(3) { display: none; }
  .dl-table td { padding: 14px 10px 14px 0; }
}


/* ---------- filing (ICP / police record number) ---------- */
.footer__filing {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-dark);
  text-align: center; font-size: 12.4px; letter-spacing: .04em;
  color: rgba(247,243,232,.45);
}
.footer__filing a { color: rgba(247,243,232,.6); }
.footer__filing a:hover { color: var(--parchment); }
.uc-filing {
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.uc-filing a { color: var(--muted); border-bottom: 1px solid rgba(47,100,70,.2); }
