@charset "UTF-8";
/* Shared layout safeguards and the complete mobile presentation, loaded last. */
.content-grid>*{min-width:0}
.article-actions{flex-wrap:wrap;align-items:center}
.article-more{position:relative;flex:none}
.article-more>summary{display:flex;align-items:center;justify-content:center;gap:8px;min-height:36px;padding:7px 13px;list-style:none;cursor:pointer;font-size:12px;border:1px solid var(--line);border-radius:9px;background:var(--surface)}
.article-more>summary::-webkit-details-marker{display:none}
.more-symbol{font:bold 20px/18px var(--font);letter-spacing:2px}
.article-more[open]>summary{color:var(--link);border-color:var(--link)}
.article-more-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:20;display:grid;gap:4px;width:196px;padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:var(--shadow)}
.article-actions .article-more-menu .button{justify-content:flex-start;min-height:44px;padding:10px 12px;border:0;box-shadow:none;transform:none}
.series-panel>summary{display:flex;justify-content:space-between;align-items:center;gap:12px;list-style:none;cursor:pointer;font-size:13px;font-weight:600;line-height:1.6}
.series-panel>summary::-webkit-details-marker{display:none}
.series-panel[open]>summary{margin-bottom:12px}
.series-chevron{flex:none;color:var(--muted);transition:transform .15s}
.series-panel[open] .series-chevron{transform:rotate(180deg)}
.diagram-scroll{display:block;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.diagram-scroll>svg{display:block;width:100%;height:auto}
.table-scroll{max-width:100%;overscroll-behavior-x:contain}
.prose :where(shiki-code,mermaid-diagram){display:block;min-width:0;max-width:100%;overflow-x:auto}
.prose :where(iframe,video,svg){max-width:100%}
.prose :where(figure,details){min-width:0;max-width:100%}
.prose summary{cursor:pointer;overflow-wrap:anywhere}
.table-scroll:focus-visible,.diagram-scroll:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

@media screen and (max-width:960px){
  /* Keep the full tool list on arrival, then give the screen back to the article. */
  html{scroll-padding-top:24px}
  .site-header{position:relative;top:auto}
  .reading-progress{top:0}
  .header-actions .icon-button,.search-trigger{width:44px;min-width:44px;height:44px;justify-content:center;padding:10px}
  .brand{max-width:calc(100% - 148px)}
  .search-trigger span,.search-trigger kbd{display:none}
  .site-nav{max-height:70dvh}
  .article-layout,:root[data-read-width] .article-layout{display:flex;flex-direction:column;gap:24px}
  .article-main{width:100%;min-width:0;padding:32px}
  .article-sidebar{order:1;position:static;top:auto;align-self:stretch;width:100%;max-height:none;overflow:visible;padding:0}
  :root[data-page=article] .article-sidebar .toc-panel{display:none}
  .article-sidebar .series-panel{display:block;margin:0;padding:16px 20px}
  .article-sidebar .series-panel>summary{min-height:44px;margin:0;font-size:14px}
  .article-sidebar .series-panel[open]>summary{margin-bottom:12px}
  .article-sidebar .series-panel ol{max-height:50dvh}
  .article-sidebar .series-panel li a{padding:12px;font-size:14px;overflow-wrap:anywhere}
  .article-sidebar .reading-note{display:none}
  .post-toolbar{gap:8px;align-items:center}
  .post-toolbar .button{min-width:0;max-width:100%;min-height:44px;white-space:normal;overflow-wrap:anywhere;line-height:1.5}
  .breadcrumbs{flex-wrap:wrap;gap:6px 10px;margin:20px 0;overflow-wrap:anywhere}
  .article-categories{flex-wrap:wrap}
  .article-header h1{font-size:30px;line-height:1.45}
  .article-actions>.button,.article-more>summary{min-height:44px}
  .article-meta{gap:8px;line-height:1.6}
  .article-meta .mini-avatar{flex:none}
  .prose{font-size:16px;line-height:1.85}
  .prose blockquote p{font-size:inherit}
  .prose :not(pre)>code{font-size:.85em;white-space:normal;overflow-wrap:anywhere}
  .prose :where(pre,table,iframe,video){max-width:100%}
  .prose .diagram-scroll>svg{min-width:min(var(--diagram-width),960px);max-width:none}
  .diagram-scroll{border:1px solid var(--line);border-radius:8px;background:var(--surface)}
  .diagram-scroll:before{content:"图示可左右滑动查看";display:block;position:sticky;left:0;width:fit-content;padding:8px 12px;color:var(--muted);font-size:12px}
  .table-scroll:before{content:"表格可左右滑动查看";display:block;position:sticky;left:0;width:fit-content;padding:8px 12px;color:var(--muted);font-size:12px}
  .code-toolbar{min-height:44px;padding:0 12px}
  .code-toolbar button{min-height:44px;padding:8px;font-size:12px}
  .prose pre{padding-top:56px}
  .toc-fab{display:flex;align-items:center;justify-content:center;min-width:64px;min-height:44px;left:16px;bottom:calc(16px + env(safe-area-inset-bottom));padding:10px 16px;border-radius:12px}
  .back-top{right:16px;bottom:calc(16px + env(safe-area-inset-bottom));width:44px;height:44px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow)}
  .dialog{max-height:calc(100dvh - 32px);overscroll-behavior:contain}
  .dialog .icon-button{width:44px;height:44px}
  .toc-sheet{width:100%;max-width:none;max-height:80dvh;margin:auto 0 0;padding:20px 20px calc(20px + env(safe-area-inset-bottom));border-radius:20px 20px 0 0}
  .toc-sheet .dialog-top{position:sticky;top:-20px;padding-block:12px;background:var(--surface);z-index:1}
  .toc-sheet-list{max-height:none}
  .toc-sheet-list a{min-height:44px;padding:12px;overflow-wrap:anywhere}
  .search-form input,.archive-filter input{min-width:0;font-size:16px}
  .button-row{flex-wrap:wrap;gap:12px}
  .section-heading,.child-head{gap:12px;flex-wrap:wrap}
  .cat-pillar-title,.cat-item-top strong,.child-head h2{min-width:0;overflow-wrap:anywhere}
  .archive-filter{flex-wrap:wrap;gap:8px}
  .archive-filter input{flex:1 1 200px;max-width:100%}
  .archive-month>a>span{min-width:0;overflow-wrap:anywhere}
  .archive-month time,.archive-month .icon{flex:none}
  .footer-main{flex-wrap:wrap}
  .footer-bottom>div{flex-wrap:wrap;overflow-wrap:anywhere}
  .site-footer{padding-bottom:calc(56px + env(safe-area-inset-bottom))}
}

@media screen and (min-width:601px) and (max-width:767px){
  .tools-inner{display:block;padding-block:8px}
  .tools-label{display:block;border:0;padding:0 0 4px;font-size:11px}
  .tools-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px}
  .tools-links>a{min-height:44px;justify-content:flex-start;padding:9px 0;border-radius:0}
  .tools-links>a:hover{background:none}
  .tools-links>a:nth-child(n+3){border-top:1px solid var(--line)}
}

@media screen and (max-width:600px){
  .container{width:calc(100% - 32px)}
  .header-inner{gap:8px}
  .brand{max-width:calc(100% - 144px)}
  .brand strong{font-size:20px}
  .brand small{font-size:10px;letter-spacing:0}
  .header-actions{gap:0}
  .header-actions .icon-button{width:44px;height:44px}
  .tools-inner{padding-block:8px}
  .tools-label{font-size:11px;letter-spacing:.5px;padding-bottom:4px}
  .tools-links{gap:0 20px}
  .tools-links>a{font-size:13px;min-height:44px;border-radius:0;background:none;box-shadow:none}
  .tools-links>a:nth-child(2n){position:relative}
  .tools-links>a:nth-child(2n):before{content:"";position:absolute;left:-10px;top:12px;bottom:12px;border-left:1px solid var(--line)}
  .tools-links .icon{width:14px;height:14px;opacity:.7}
  .home-top{margin-top:20px;gap:16px}
  .home-top .hero{padding:20px 0;background:none;border:0;border-radius:0;box-shadow:none}
  .home-top .hero:before,.home-top .hero:after{display:none}
  .home-top .hero h1{font-size:28px;line-height:1.45;margin:12px 0}
  .home-top .hero-copy>p{font-size:14px;line-height:1.8;margin:0}
  .home-top .hero .eyebrow{font-size:10px;letter-spacing:1px}
  .profile-card{display:block;border-radius:16px}
  .profile-art{display:none}
  .profile-content{padding:20px}
  .profile-content p{font-size:14px}
  .profile-content h2{font-size:20px}
  .home-profile .profile-content{display:flex;align-items:center;gap:12px;padding:16px}
  .home-profile .profile-avatar{position:static;flex:none;width:40px;height:40px;margin:0;border:0}
  .home-profile .profile-content h2{font-size:18px;margin:0;min-width:0;overflow-wrap:anywhere}
  .home-profile .profile-label,.home-profile .profile-content p,.home-profile .profile-location{display:none}
  .home-profile .profile-links{margin:0 0 0 auto;gap:4px;flex-wrap:nowrap}
  .home-profile .profile-links .button{padding:8px;gap:4px;min-height:44px;border:0;background:none;color:var(--link);box-shadow:none;font-size:12px}
  .home-profile .profile-links .icon-button{width:36px;min-height:44px;padding:8px}
  #articles{margin-top:28px}
  .content-grid{gap:24px}
  .section-heading{align-items:flex-end;margin-bottom:20px}
  .section-heading h2{font-size:24px}
  .section-heading .eyebrow{font-size:10px;letter-spacing:1px}
  .section-link{min-height:44px;display:inline-flex;align-items:center}
  .category-tabs{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;max-width:100%;gap:8px;margin-bottom:16px;padding-bottom:8px;scrollbar-width:thin}
  .category-tabs a{flex:none;min-height:44px;display:flex;align-items:center;padding:8px 12px;border-radius:8px;font-size:13px;box-shadow:none}
  .category-tabs .active{box-shadow:none}
  .post-grid{gap:12px}
  .post-row{position:relative;display:block;padding:20px 16px;border-radius:14px;box-shadow:none}
  .post-row h3{font-size:18px;line-height:1.6;padding-right:0}
  .post-row .row-excerpt{font-size:14px;line-height:1.7;margin:10px 0 12px}
  .row-meta{gap:8px;font-size:12px;padding-right:36px}
  .row-meta a{overflow-wrap:anywhere}
  .row-tags{display:flex;flex-wrap:wrap;gap:8px;min-width:0}
  .post-row>.save-button{position:absolute;right:8px;bottom:10px;width:44px;height:44px}
  .sidebar{display:grid;grid-template-columns:minmax(0,1fr);margin-top:8px}
  .sidebar .side-panel{display:block;padding:20px;border-radius:16px}
  .page-heading{padding:24px 0 20px}
  .page-heading h1{font-size:28px;line-height:1.4;overflow-wrap:anywhere;text-wrap:wrap}
  .page-heading p{font-size:14px;line-height:1.8}
  .breadcrumbs{margin:16px 0;font-size:12px}
  .post-toolbar{display:flex;flex-wrap:wrap;margin-bottom:16px;gap:8px}
  .post-toolbar .button{font-size:12px;padding:8px 12px;flex:0 1 auto}
  .post-toolbar .button:nth-child(2){flex:1;justify-content:flex-start}
  .post-toolbar .button:last-child{display:none}
  .article-main{padding:24px 16px;border-radius:16px;box-shadow:none}
  .article-header{padding-bottom:20px;margin-bottom:24px}
  .article-header h1{font-size:26px;line-height:1.45;letter-spacing:0}
  .article-excerpt{font-size:14px;line-height:1.8;margin-top:16px}
  .article-categories{margin-bottom:12px}
  .article-header:has(.series-badge) .article-categories{display:none}
  .series-badge{font-size:12px;gap:6px}
  .series-bar{display:none}
  .article-meta{font-size:12px;margin:16px 0;gap:6px 8px}
  .article-meta time{white-space:nowrap}
  .article-meta .label-dot{display:none}
  .article-meta .reading-time:before{content:none}
  .article-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(56px,1fr));align-items:stretch;gap:6px}
  .article-actions>.button,.article-more>summary{width:100%;min-width:0;min-height:60px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:8px 2px;font-size:12px;line-height:1.5;border:0;border-radius:8px;background:var(--bg);box-shadow:none;white-space:normal;transform:none}
  .article-actions>.button .icon{width:18px;height:18px}
  .article-more{min-width:0}
  .article-more-menu{width:180px}
  .article-more-menu .button{font-size:13px;gap:8px}
  .tldr-card{padding:16px;margin-bottom:24px;border-radius:12px}
  .tldr-card p{font-size:14px;line-height:1.8}
  .prose p{margin:1.25em 0}
  .prose h1{font-size:26px}
  .prose h2{font-size:23px;line-height:1.5;padding-bottom:12px}
  .prose h3{font-size:19px;line-height:1.6}
  .prose h4{font-size:16px}
  .prose ul,.prose ol{padding-left:1.4em}
  .prose blockquote{padding:4px 16px;margin:24px 0}
  .prose pre{font-size:12px;line-height:1.8;padding:56px 16px 16px}
  .prose th,.prose td{padding:10px 12px;line-height:1.7}
  .prose img{margin:20px auto;border-radius:8px}
  .article-end{margin:24px 0;padding:24px 0}
  .post-tags{flex-wrap:wrap}
  .post-tags a{max-width:100%;overflow-wrap:anywhere}
  .article-service{padding:20px;gap:16px;align-items:stretch}
  .article-service .eyebrow{overflow-wrap:anywhere}
  .post-adjacent{grid-template-columns:minmax(0,1fr);gap:12px;margin-top:24px}
  .post-adjacent strong,.post-adjacent small,.related-list>a>span{overflow-wrap:anywhere}
  .post-adjacent .adj-next{text-align:left}
  .related-list>a{font-size:14px;line-height:1.7;align-items:center;min-width:0}
  .related-list>a>span{min-width:0}
  .standalone-prose,.about-article{max-width:100%;padding:24px 16px;border-radius:16px}
  .sub-grid,.cat-items,.collection-grid{grid-template-columns:minmax(0,1fr)}
  .cat-pillar[data-cat]{padding:20px 16px;border-radius:16px}
  .cat-pillar-head{flex-direction:column;gap:12px}
  .cat-pillar-title h2{font-size:22px}
  .cat-pillar-side{width:100%;flex-direction:row;justify-content:space-between}
  .cat-recent li{align-items:flex-start;flex-direction:column;gap:4px;padding:12px 0}
  .cat-recent li a{white-space:normal;overflow-wrap:anywhere;font-size:14px;line-height:1.7}
  .cat-item-top{gap:12px}
  .cat-grand{display:block;margin:8px 0 0;width:fit-content}
  .child-section{padding:20px 12px;border-radius:16px}
  .child-head{align-items:flex-start;flex-direction:column;gap:0}
  .child-head .section-link{font-size:12px}
  .symptom-row{padding:16px;gap:8px;border-radius:12px}
  .chip{min-height:44px;padding:8px 12px;font-size:12px}
  .archive-panel{padding:20px 16px}
  .archive-month>a{font-size:14px;gap:12px;line-height:1.7;padding-block:12px}
  .archive-month time{font-size:12px}
  .tags-panel{padding:16px;gap:8px}
  .tags-panel>a{min-height:44px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
  .tags-toolbar{flex-wrap:wrap;gap:8px}
  .seg{max-width:100%;flex-wrap:wrap}
  .seg button{min-height:44px;padding:8px 12px}
  .services-section{padding:24px 16px;border-radius:16px}
  .service-card{padding:20px;border-radius:12px}
  .service-symbol{position:static;margin-bottom:12px}
  .case-grid{grid-template-columns:minmax(0,1fr)}
  .case-art>span{max-width:100%;overflow-wrap:anywhere}
  .dialog{width:calc(100% - 24px);padding:20px 16px;border-radius:16px}
  .dialog-top{gap:12px}
  .dialog-top h2{font-size:20px;min-width:0}
  .dialog .button-row{gap:8px}
  .dialog .button-row .button{flex:1;padding-inline:8px;white-space:normal}
  .toc-sheet{width:100%;border-radius:16px 16px 0 0;padding-bottom:calc(20px + env(safe-area-inset-bottom))}
  .search-results a{padding:12px 4px;overflow-wrap:anywhere}
  .saved-list a{min-width:0;overflow-wrap:anywhere}
  .toast{max-width:calc(100% - 32px);white-space:normal;bottom:calc(76px + env(safe-area-inset-bottom));text-align:center}
  .footer-links{grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:4px 16px}
  .footer-links>a,.footer-links>button{display:flex;align-items:center;min-height:44px;text-align:left}
  .footer-bottom{align-items:flex-start}
  .pagination{flex-wrap:wrap;gap:8px}
  .pagination a,.pagination span{min-width:40px;min-height:44px}
}

@media print{.article-more,.diagram-scroll:before,.table-scroll:before{display:none}}
