/* Modelab 主站 · 与 Manage 同一套色板与 MiSans 字体；紧凑字号（正文 15px）、40px 触控目标。 */
:root{color-scheme:light;--bg:#f7f5ef;--surface:#fffdf8;--surface-subtle:#f3f0e8;--border:#dedbd0;--text:#24221a;--text-2:#5f5a4f;--muted:#8a8478;--primary:#24221a;--primary-hover:#403d34;--primary-soft:#fff0a8;--link:#2563eb;--accent:#8b6d24;--radius:12px;--wrap:1120px;font-family:"MiSans","Noto Sans SC","PingFang SC","Hiragino Sans","Noto Sans JP","Microsoft YaHei",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:15px;line-height:1.65;-webkit-text-size-adjust:100%;text-rendering:optimizeLegibility}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:72px}
body{margin:0;min-height:100vh;display:flex;flex-direction:column;color:var(--text);background:var(--bg)}
main{flex:1}
img{max-width:100%;height:auto}
a{color:inherit}
h1,h2,h3,h4{margin:0;line-height:1.2;letter-spacing:-.025em;font-weight:700}
:focus-visible{outline:3px solid var(--primary-soft);outline-offset:2px;border-radius:6px}
.wrap{width:min(100% - 40px,var(--wrap));margin-inline:auto}
.wrap-narrow{--wrap:760px}
.skip-link{position:absolute;left:12px;top:-60px;z-index:20;padding:10px 16px;border-radius:8px;background:var(--primary);color:#fff;font-size:15px;text-decoration:none}
.skip-link:focus{top:12px}
.eyebrow{margin:0 0 8px;color:var(--accent);font-size:13px;font-weight:600;letter-spacing:.08em;text-transform:uppercase}

/* Header */
.site-header{position:sticky;top:0;z-index:10;border-bottom:1px solid var(--border);background:rgba(247,245,239,.9);-webkit-backdrop-filter:saturate(1.4) blur(12px);backdrop-filter:saturate(1.4) blur(12px)}
.site-header-inner{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:56px}
.brand{display:inline-flex;align-items:center;gap:10px;min-height:40px;font-size:16px;font-weight:700;letter-spacing:-.02em;text-decoration:none}
.brand img{width:30px;height:30px;border-radius:8px;background:var(--surface);object-fit:cover}
.site-nav{display:flex;align-items:center;gap:4px}
.site-nav a{display:inline-flex;align-items:center;min-height:36px;padding:0 12px;border-radius:8px;color:var(--text-2);font-size:14px;font-weight:600;text-decoration:none}
.site-nav a:hover{color:var(--text);background:#eeeae0}
.site-nav a[aria-current="page"]{color:var(--text);background:#eeeae0}

/* Hero */
.hero{padding:32px 0 32px}
.hero-row{display:flex;align-items:center;justify-content:space-between;gap:32px}
.hero-text{min-width:0}
.hero-avatar{display:block;width:64px;height:64px;margin-bottom:20px;border:1px solid var(--border);border-radius:18px;background:var(--surface);object-fit:cover;box-shadow:0 1px 2px rgba(36,34,26,.05)}
.hero h1{max-width:14em;font-size:clamp(30px,4.2vw,44px);letter-spacing:-.045em}
.hero-intro{max-width:34em;margin:14px 0 0;color:var(--text-2);font-size:clamp(15px,1.5vw,17px);line-height:1.7}
.hero-actions{display:flex;flex-direction:column;gap:10px;flex:0 0 auto;min-width:190px}
.button{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 18px;border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--text);font-size:14px;font-weight:600;text-decoration:none;transition:background .15s,border-color .15s}
.button:hover{border-color:#c9c3b5;background:#fff}
.button-primary{border-color:var(--primary);background:var(--primary);color:#fff}
.button-primary:hover{border-color:var(--primary-hover);background:var(--primary-hover)}

/* Sections */
.section{padding:44px 0;border-top:1px solid var(--border)}
.section-alt{background:var(--surface-subtle)}
.section-tight{padding-top:8px;border-top:0}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:20px}
.section-head h2{font-size:clamp(21px,2.2vw,26px)}
.section-note{margin:0;color:var(--muted);font-size:13px}
.section-link{display:inline-flex;align-items:center;flex:0 0 auto;min-height:32px;padding:0 14px;border:1px solid var(--primary);border-radius:8px;background:var(--primary);color:#fff;font-size:13px;font-weight:600;line-height:1;text-decoration:none;white-space:nowrap;transition:background .15s,border-color .15s}
.section-link:hover{border-color:var(--primary-hover);background:var(--primary-hover);color:#fff}

/* Products */
.product-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.product-card{display:flex;align-items:flex-start;gap:14px;min-width:0;padding:16px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);text-decoration:none;box-shadow:0 1px 2px rgba(36,34,26,.035);transition:border-color .15s,box-shadow .15s,transform .15s}
.product-card:hover{border-color:#c9c3b5;box-shadow:0 6px 20px rgba(36,34,26,.07);transform:translateY(-1px)}
.product-icon{flex:0 0 44px;width:44px;height:44px;object-fit:contain}
.product-body{display:grid;gap:3px;min-width:0}
.product-name{display:flex;align-items:baseline;gap:8px;font-size:15px;font-weight:700;letter-spacing:-.01em;line-height:1.4}
.product-head{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0}
.product-head .badges{margin:0}
.product-card:focus-visible{outline:2px solid var(--text);outline-offset:2px}
.product-tagline{color:var(--text-2);font-size:13px;line-height:1.55}
.badges{display:flex;flex-wrap:wrap;gap:5px;margin-top:5px}
.badge{display:inline-flex;align-items:center;min-height:20px;padding:0 8px;border-radius:999px;background:#eeeae0;color:#625b50;font-size:12px;font-weight:600;line-height:1}
.product-card.is-compact{padding:16px}

/* Post list */
.post-list{display:grid;gap:0;margin:0;padding:0;list-style:none;border-top:1px solid var(--border)}
.post-item{padding:18px 0;border-bottom:1px solid var(--border)}
.post-link{display:grid;gap:5px;text-decoration:none}
.post-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;margin:0;color:var(--muted);font-size:12px;font-weight:500}
.post-no{color:var(--accent);font-weight:700;letter-spacing:.04em;font-variant-numeric:tabular-nums}
.post-title{font-size:clamp(17px,1.8vw,19px);font-weight:700;letter-spacing:-.025em;line-height:1.3}
.post-link:hover .post-title{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:5px}
.post-summary{max-width:46em;color:var(--text-2);font-size:14px;line-height:1.7}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.chip{display:inline-flex;align-items:center;min-height:28px;padding:0 11px;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--text-2);font-size:12px;font-weight:600;text-decoration:none}
.chip:hover{border-color:#c9c3b5;color:var(--text)}
.empty{margin:0;padding:24px 0;color:var(--muted)}

/* Page head + filter */
.page-head{padding:44px 0 24px}
.page-head h1{font-size:clamp(28px,3.4vw,38px);letter-spacing:-.04em}
.page-lead{max-width:36em;margin:10px 0 0;color:var(--text-2);font-size:15px}
.filter{display:flex;flex-wrap:wrap;gap:6px;margin-top:20px}
.filter a{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 13px;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--text-2);font-size:13px;font-weight:600;text-decoration:none}
.filter a span{color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}
.filter a:hover{border-color:#c9c3b5;color:var(--text)}
.filter a[aria-current="page"]{border-color:var(--primary);background:var(--primary);color:#fff}
.filter a[aria-current="page"] span{color:rgba(255,255,255,.7)}

/* Article */
.article{padding:36px 0 56px}
.article-head{margin-bottom:28px;padding-bottom:22px;border-bottom:1px solid var(--border)}
.back-link{display:inline-flex;align-items:center;min-height:36px;margin-bottom:10px;color:var(--text-2);font-size:14px;font-weight:600;text-decoration:none}
.back-link:hover{color:var(--text)}
.article-head .post-meta{margin-bottom:10px}
.article-head h1{font-size:clamp(26px,3.2vw,34px);letter-spacing:-.03em;line-height:1.25}
.prose{font-size:15px;line-height:1.8;overflow-wrap:anywhere}
.prose>*{margin:0}
.prose>*+*{margin-top:1em}
.prose h2{margin-top:1.8em;font-size:21px;line-height:1.35}
.prose h3{margin-top:1.6em;font-size:18px}
.prose h4{margin-top:1.4em;font-size:16px}
.prose a{color:var(--link);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
.prose a:hover{text-decoration-thickness:2px}
.prose strong{font-weight:700}
.prose figure{margin-block:1.6em}
.prose figure+figure{margin-top:1em}
.prose figure img{display:block;width:auto;max-width:min(100%,560px);margin-inline:auto}
.prose img.img-w25,.prose img.img-w50,.prose img.img-w75,.prose img.img-w100{max-width:100%;height:auto}
.prose img.img-w25{width:25%}.prose img.img-w50{width:50%}.prose img.img-w75{width:75%}.prose img.img-w100{width:100%}
@media (max-width:560px){.prose img.img-w25{width:50%}}
.prose ul,.prose ol{padding-left:1.3em}
.prose li+li{margin-top:.45em}
.prose li::marker{color:var(--muted)}
.prose blockquote{padding:12px 18px;border-left:3px solid var(--primary-soft);border-radius:0 10px 10px 0;background:var(--surface-subtle);color:var(--text-2)}
.prose hr{height:1px;margin-block:2.4em;border:0;background:var(--border)}
.prose code{padding:2px 7px;border-radius:6px;background:#eeeae0;font:13px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace}
.prose pre{overflow-x:auto;padding:14px 16px;border-radius:10px;background:#24221a;color:#f7f5ef}
.prose pre code{padding:0;background:none;color:inherit;font-size:13px}
.article-product{margin-top:40px;padding-top:24px;border-top:1px solid var(--border)}
.pager{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:32px}
.pager a{display:grid;gap:4px;min-height:40px;padding:14px 16px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);text-decoration:none}
.pager a:hover{border-color:#c9c3b5}
.pager small{color:var(--muted);font-size:12px;font-weight:600}
.pager span{font-size:15px;font-weight:700;line-height:1.4}
.pager-next{grid-column:2;text-align:right}

/* Footer */
.site-footer{border-top:1px solid var(--border);color:var(--muted);font-size:13px}
.site-footer-inner{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 20px;padding-block:20px}
.site-footer p{margin:0}
.site-footer nav{display:flex;flex-wrap:wrap;gap:4px 8px}
.site-footer a{display:inline-flex;align-items:center;min-height:36px;padding:0 8px;color:var(--text-2);font-weight:600;text-decoration:none}
.site-footer a:hover{color:var(--text)}
.error-page{max-width:560px;margin:18vh auto;padding:0 20px}
.error-page h1{font-size:30px}
.error-page p{color:var(--text-2)}

/* Intro toggle (home): collapsed by default, circular black arrow next to brand */
.intro-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:26px;height:26px;margin:0 auto 0 -8px;padding:0;border:0;border-radius:50%;background:var(--primary);color:#fff;cursor:pointer;transition:background .15s ease}
.intro-toggle:hover{background:#000}
.intro-toggle:focus-visible{outline:2px solid var(--primary);outline-offset:3px}
.intro-toggle svg{transition:transform .25s ease}
.intro-toggle[aria-expanded="true"] svg{transform:rotate(180deg)}
.hero.intro-panel{display:grid;grid-template-rows:0fr;padding:0;transition:grid-template-rows .3s ease}
.intro-panel.is-open{grid-template-rows:1fr}
.intro-inner{min-height:0;overflow:hidden}
.intro-inner>.wrap{padding:30px 0 30px}
.intro-panel+.section{padding-top:28px;border-top:0}
.intro-panel.is-open+.section{border-top:1px solid var(--border)}

/* Post cards with covers */
.post-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:0;padding:0;list-style:none}
.post-card{display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--border);border-radius:14px;background:var(--surface);transition:border-color .15s ease,box-shadow .15s ease}
.post-card:hover{border-color:#c9c3b5;box-shadow:0 4px 14px rgba(36,34,26,.06)}
.post-card-link{display:flex;flex-direction:column;flex:1 1 auto;text-decoration:none}
.post-cover{display:block;aspect-ratio:16/9;overflow:hidden;border-bottom:1px solid var(--border);background:var(--surface-subtle)}
.post-cover img{display:block;width:100%;height:100%;object-fit:cover}
.post-cover-ph{display:flex;align-items:center;justify-content:center;width:100%;height:100%;background:repeating-linear-gradient(135deg,var(--surface-subtle) 0 10px,var(--bg) 10px 20px)}
.post-cover-ph span{padding:4px 10px;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--accent);font-size:12px;font-weight:700;letter-spacing:.04em}
.post-card-body{display:grid;gap:5px;padding:12px 14px 0}
.post-card .post-title{font-size:16px;line-height:1.35}
.post-card .post-summary{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:13px;line-height:1.6}
.post-card-link:hover .post-title{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
.post-card .chips{margin:0;padding:10px 14px 14px}
.post-card-link:only-child .post-card-body{padding-bottom:14px}
.post-card .chip{min-height:24px;padding:0 9px;font-size:11px}

@media (max-width:960px){.product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.post-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){
  :root{font-size:15px}
  .wrap{width:min(100% - 40px,var(--wrap))}
  .site-header-inner{min-height:52px;gap:8px}
  .brand{font-size:15px;gap:8px}
  .brand img{width:28px;height:28px;border-radius:8px}
  .site-nav a{padding:0 10px;font-size:14px}
  .site-nav a:first-child{display:none}
  .hero{padding:24px 0 24px}
  .hero-row{flex-direction:column;align-items:stretch;gap:20px}
  .hero-avatar{width:56px;height:56px;margin-bottom:16px;border-radius:16px}
  .hero-intro{margin-top:12px}
  .hero-actions{flex-direction:row;min-width:0}
  .hero-actions .button{flex:1 1 0}
  .section{padding:32px 0}
  .section-tight{padding-top:0}
  .section-head{align-items:flex-end;gap:12px;margin-bottom:16px}
  .section-note{text-align:right}
  .product-grid{grid-template-columns:1fr;gap:10px}
  .product-card{padding:14px;gap:12px}
  .product-icon{flex-basis:42px;width:42px;height:42px}
  .post-grid{grid-template-columns:1fr;gap:12px}
  .intro-inner>.wrap{padding:24px 0 24px}
  .intro-toggle{margin-left:-4px}
  .page-head{padding:30px 0 18px}
  .page-lead{font-size:15px}
  .filter{flex-wrap:wrap}
  .article{padding:22px 0 44px}
  .article-head{margin-bottom:22px;padding-bottom:18px}
  .article-head .back-link{margin-bottom:8px}
  .prose{font-size:15px;line-height:1.8}
  .prose h2{font-size:19px}
  .pager{grid-template-columns:1fr}
  .pager-next{grid-column:auto}
  .site-footer-inner{flex-direction:column;align-items:flex-start;padding-block:16px 20px}
  .site-footer nav{margin-left:-8px}
}
/* Header tools: nav + language switcher (globe, like plant) */
.header-tools{display:flex;align-items:center;gap:4px}
.lang-switch{position:relative}
.lang-trigger{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--text-2);cursor:pointer}
.lang-trigger:hover,.lang-trigger[aria-expanded="true"]{color:var(--text);background:#eeeae0}
.lang-trigger:focus-visible,.lang-item:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.lang-menu{position:absolute;top:calc(100% + 6px);right:0;z-index:20;display:flex;flex-direction:column;min-width:172px;padding:6px;border:1px solid var(--border);border-radius:12px;background:var(--surface);box-shadow:0 10px 30px rgba(36,34,26,.12)}
.lang-menu[hidden]{display:none}
.lang-item{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:34px;padding:0 10px;border:0;border-radius:8px;background:transparent;color:var(--text-2);font:inherit;font-size:14px;font-weight:500;text-align:left;cursor:pointer}
.lang-item:hover{color:var(--text);background:var(--surface-subtle)}
.lang-item.is-active{color:var(--text);font-weight:700}
.lang-item.is-active::after{content:"";width:6px;height:6px;border-radius:50%;background:var(--primary)}
/* Post language versions */
.post-langs{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:14px;font-size:13px}
.post-langs span{margin-right:2px;color:var(--muted)}
.post-langs a{display:inline-flex;align-items:center;min-height:28px;padding:0 10px;border:1px solid var(--border);border-radius:999px;color:var(--text-2);font-weight:600;text-decoration:none}
.post-langs a:hover{color:var(--text);background:var(--surface-subtle)}
.post-langs a[aria-current="true"]{border-color:var(--primary);background:var(--primary);color:#fff}
@media (max-width:640px){.header-tools{gap:0}.lang-trigger{width:34px;height:34px}}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}.product-card{transition:none}.product-card:hover{transform:none}.hero.intro-panel,.intro-toggle svg{transition:none}}
span.product-icon{border-radius:11px;background:var(--surface-subtle)}
