/* Design tokens shared with www.zxxsa.com (assets/site.css). */
:root {
    --paper: #f5f3ec;
    --surface: #fbfaf6;
    --ink: #202420;
    --muted: #59615a;
    --green: #086f60;
    --line: #d1d3c8;
    --pale: #e8ece2;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    --measure: 42em;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.75; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; text-underline-offset: 4px; }
a:hover { color: var(--green); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { overflow-wrap: anywhere; line-height: 1.35; }
ol, ul { margin: 0; padding: 0; }
::selection { background: #bed9cc; color: #102c25; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
button, input { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 20; left: 16px; top: -80px; padding: 12px 20px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 12px; color: #fff; }
.wrap { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
main.wrap { padding-block: 32px 72px; }
main:focus { outline: none; }

/* Header */
.masthead { display: flex; align-items: center; gap: 28px; min-height: 96px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; min-height: 44px; }
.brand img { width: 40px; height: 40px; }
.brand-name { font-size: 22px; font-weight: 750; letter-spacing: -.3px; line-height: 1.2; }
.brand-note { display: block; margin-top: 4px; font-size: 10px; font-weight: 500; letter-spacing: .22em; color: var(--muted); }
.masthead-note { padding-left: 24px; border-left: 1px solid var(--line); font-size: 14px; letter-spacing: .08em; }
.masthead-note span { display: block; font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.header-search { display: flex; align-items: center; width: 280px; margin-left: auto; border: 1px solid var(--line); background: var(--surface); }
.header-search:focus-within { border-color: var(--green); }
.header-search input { flex: 1; min-width: 0; height: 44px; padding: 0 0 0 14px; border: 0; background: transparent; font-size: 14px; }
.header-search input:focus-visible { outline: none; }
.header-search button { display: grid; place-items: center; width: 46px; height: 44px; flex-shrink: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.header-search button:hover { color: var(--green); }
.main-nav { border-block: 1px solid var(--line); }
.main-nav .wrap { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; }
.main-nav .wrap:has(.nav-demo-menu[open]) { overflow: visible; }
.main-nav .wrap::-webkit-scrollbar { display: none; }
.main-nav a { position: relative; display: inline-flex; align-items: center; min-height: 52px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.main-nav a[aria-current="page"] { color: var(--green); }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--green); }
.nav-demo-menu { position: relative; display: flex; flex: 0 0 auto; align-items: stretch; }
.nav-demo-menu summary { display: inline-flex; align-items: center; min-height: 52px; color: var(--ink); font-size: 15px; font-weight: 600; white-space: nowrap; cursor: pointer; list-style: none; }
.nav-demo-menu summary::-webkit-details-marker { display: none; }
.nav-demo-menu summary::after { content: "⌄"; margin-left: 6px; color: var(--muted); font-size: 14px; transform: translateY(-1px); }
.nav-demo-menu[open] summary { color: var(--green); }
.nav-demo-menu[open] summary::after { content: "⌃"; }
.nav-demo-menu__items { position: absolute; z-index: 20; top: calc(100% - 1px); left: -12px; display: grid; gap: 2px; min-width: 244px; padding: 8px; border: 1px solid var(--line); background: var(--paper); box-shadow: 0 12px 30px rgba(22, 37, 34, .14); }
.nav-demo-menu__items a { display: grid; gap: 2px; min-height: 44px; padding: 8px 12px; color: var(--ink); font-size: 14px; font-weight: 600; white-space: normal; }
.nav-demo-menu__items a:hover, .nav-demo-menu__items a:focus-visible { background: var(--pale); color: var(--green); }
.nav-demo-menu__items small { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.4; }

/* Layout */
.columns { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.main-column, .article { min-width: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; font-size: 13px; color: var(--muted); }
.breadcrumb a:hover { color: var(--green); }
.page-head { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--ink); }
.page-head h1 { font-size: 30px; font-weight: 750; }
.page-head p { margin-top: 8px; color: var(--muted); }
.page-head--home { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.page-head--home h1 { font-size: 24px; }
.page-head--home p { margin-top: 0; font-size: 14px; }
.page-date { margin-left: auto; font-size: 13px; color: var(--muted); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.section-head h2 { font-size: 18px; font-weight: 700; }
.section-head span, .section-head a, .eyebrow { font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.section-head a:hover { color: var(--green); }

/* Stories */
.story-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.category { color: var(--green); font-weight: 600; }
.category:hover { text-decoration: underline; }
.focus { margin-bottom: 40px; }
.feature { border-bottom: 1px solid var(--line); padding-block: 20px 28px; }
.feature-image img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--pale); }
.feature-copy { padding-top: 20px; }
.feature-copy h2 { margin-top: 10px; font-size: 28px; font-weight: 750; }
.feature-copy p { margin-top: 12px; color: var(--muted); }
.feature--text .feature-copy { padding: 24px; background: var(--pale); border-left: 3px solid var(--green); }
.read-more { display: inline-flex; gap: 8px; margin-top: 16px; min-height: 44px; align-items: center; color: var(--green); font-weight: 600; }
.story { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; padding-block: 22px; border-bottom: 1px solid var(--line); }
.story h2 { margin-top: 6px; font-size: 19px; font-weight: 700; }
.story p { margin-top: 8px; font-size: 15px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story-image img { width: 200px; aspect-ratio: 3 / 2; object-fit: cover; background: var(--pale); }
.empty-state { padding: 32px; background: var(--pale); }
.empty-state h2 { font-size: 18px; }
.empty-state p { margin-top: 6px; color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 32px; font-size: 14px; }
.pager a, .pager span[aria-disabled] { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); }
.pager a:hover { border-color: var(--green); }
.pager span[aria-disabled] { color: var(--muted); opacity: .6; }
.pager-current { color: var(--muted); }

/* Sidebar */
.sidebar { display: grid; gap: 36px; }
.side-section .section-head { border-bottom-color: var(--ink); }
.brief-list { list-style: none; }
.brief-list li { padding-block: 14px; border-bottom: 1px solid var(--line); }
.brief-list time, .brief-list span { font-size: 12px; color: var(--muted); }
.brief-list h3 { margin-block: 4px; font-size: 15px; font-weight: 600; }
.reading-note { padding: 22px; background: var(--pale); border-left: 3px solid var(--green); }
.reading-note h2 { margin-top: 6px; font-size: 17px; }
.reading-note p { margin-top: 8px; font-size: 14px; color: var(--muted); }
.wechat img { width: 200px; margin: 16px auto 12px; }
.wechat p { font-size: 14px; color: var(--muted); text-align: center; }
.wechat strong { display: block; color: var(--ink); }
.directory { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
.directory a { display: flex; justify-content: space-between; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); font-size: 15px; }
.directory a[aria-current="page"] { color: var(--green); font-weight: 600; }
.tool { padding-block: 14px; border-bottom: 1px solid var(--line); }
.tool h3 { font-size: 15px; font-weight: 600; }
.tool p { margin-top: 4px; font-size: 13px; color: var(--muted); }

/* Article */
.article-header h1 { margin-top: 12px; font-size: 34px; font-weight: 750; line-height: 1.3; }
.byline { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.deck { margin-top: 24px; padding: 18px 20px; max-width: var(--measure); background: var(--pale); border-left: 3px solid var(--green); color: #343a35; }
.cover { margin-top: 28px; }
.cover img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--pale); }
.cover figcaption { margin-top: 8px; font-size: 12px; color: var(--muted); }
.article-body { max-width: var(--measure); margin-top: 28px; font-size: 17px; line-height: 1.9; }
.article-body > * + * { margin-top: 1.1em; }
.article-body h2 { margin-top: 1.8em; font-size: 22px; }
.article-body h3, .article-body h4 { margin-top: 1.5em; font-size: 19px; }
.article-body a { color: var(--green); text-decoration: underline; text-decoration-color: #9cc4b8; overflow-wrap: anywhere; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body li + li { margin-top: .4em; }
.article-body blockquote { margin-inline: 0; padding-left: 18px; border-left: 3px solid var(--line); color: var(--muted); }
.article-body pre { overflow-x: auto; padding: 16px; background: #1e2420; color: #e8ece2; font-size: 14px; line-height: 1.6; }
.article-body code { font-family: "SFMono-Regular", Consolas, monospace; font-size: .9em; }
.article-body :not(pre) > code { padding: 2px 5px; background: var(--pale); }
.endnote { max-width: var(--measure); margin-top: 40px; padding: 18px 20px; border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.endnote strong { color: var(--ink); }
.follow { display: flex; gap: 18px; align-items: center; max-width: var(--measure); margin-top: 24px; padding: 18px; background: var(--surface); border: 1px solid var(--line); }
.follow img { width: 112px; flex-shrink: 0; background: #fff; }
.follow p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: var(--measure); margin-top: 32px; }
.prev-next a { display: block; padding: 16px; border: 1px solid var(--line); }
.prev-next a:hover { border-color: var(--green); }
.prev-next a:last-child:not(:first-child) { text-align: right; }
.prev-next span { display: block; font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.prev-next strong { display: block; margin-top: 4px; font-size: 15px; font-weight: 600; }

/* Search and misc */
.search-form { display: flex; gap: 12px; margin-bottom: 12px; }
.search-form input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid var(--line); background: var(--surface); }
.search-form button { height: 48px; padding: 0 22px; border: 0; background: var(--ink); color: var(--paper); cursor: pointer; }
.search-form button:hover { background: var(--green); }
.not-found-links { display: flex; gap: 24px; }
.not-found-links a { color: var(--green); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.demo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.demo-card { min-height: 220px; padding: 24px; border: 1px solid var(--line); background: var(--surface); }
.demo-card h2 { margin-top: 10px; font-size: 22px; line-height: 1.35; }
.demo-card h2 a:hover { color: var(--green); }
.demo-card > p:not(.eyebrow) { margin-top: 14px; color: var(--muted); line-height: 1.7; }
.demo-card__link { display: inline-flex; gap: 8px; align-items: center; margin-top: 28px; color: var(--green); font-weight: 650; }

/* Footer */
.site-footer { border-top: 1px solid var(--ink); background: var(--pale); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr; gap: 40px; padding-block: 44px; }
.footer-brand { font-size: 18px; font-weight: 750; }
.site-footer p { margin-top: 8px; color: var(--muted); }
.footer-small { font-size: 12px; }
.site-footer h2 { font-size: 13px; letter-spacing: .12em; margin-bottom: 8px; }
.footer-links nav { display: grid; }
.footer-links a { min-height: 32px; display: inline-flex; align-items: center; color: var(--muted); }
.footer-links a:hover { color: var(--green); }
.footer-bottom { display: flex; justify-content: space-between; padding-block: 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

@media (max-width: 1023px) {
    .columns { grid-template-columns: minmax(0, 1fr); gap: 48px; }
    .masthead-note { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-method { grid-column: 1 / -1; }
    .demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .wrap { width: calc(100% - 32px); }
    main.wrap { padding-block: 20px 56px; }
    .masthead { flex-wrap: wrap; gap: 12px; min-height: 0; padding-block: 14px; }
    .header-search { width: 100%; margin-left: 0; }
    .brand-name { font-size: 20px; }
    .main-nav .wrap { gap: 22px; overflow: visible; flex-wrap: wrap; }
    .nav-demo-menu[open] { flex-basis: 100%; }
    .nav-demo-menu__items { position: static; min-width: 0; margin: 0 0 10px; box-shadow: none; }
    .page-head h1 { font-size: 24px; }
    .feature-copy h2 { font-size: 22px; }
    .story { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .story-image { order: -1; }
    .story-image img { width: 100%; }
    .story h2 { font-size: 18px; }
    .demo-grid { grid-template-columns: minmax(0, 1fr); }
    .article-header h1 { font-size: 26px; }
    .article-body { font-size: 16px; line-height: 1.85; }
    .follow { flex-direction: column; align-items: flex-start; }
    .prev-next { grid-template-columns: minmax(0, 1fr); }
    .prev-next a:last-child:not(:first-child) { text-align: left; }
    .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 32px; }
    .footer-bottom { flex-direction: column; gap: 6px; }
    .page-date { margin-left: 0; }
}
