/* ============ C1 设计令牌 ============ */
:root{--ink:#111316;--muted:#6a6f76;--line:#d8dce1;--gray:#f2f2f2;--white:#ffffff;--green:#164b3c;--gutter:clamp(22px,4.5vw,72px);--space:clamp(76px,10vw,150px)}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;background:var(--white);color:var(--ink);
  font-family:Inter,"Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size:17px;line-height:1.7;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,p,figure,ol{margin:0}
ul,ol{padding:0;list-style:none}

/* ============ C5 图片全局 ============ */
img{display:block;width:100%;height:100%;object-fit:cover}

/* ============ K-01 视觉隐藏 ============ */
.visually-hidden{
  position:absolute;width:1px;height:1px;margin:-1px;padding:0;
  overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);border:0;
  white-space:nowrap;
}

/* ============ K-09 文字链接 ============ */
.text-link{color:var(--green);text-decoration:none;transition:color 180ms ease}
.text-link:hover{text-decoration:underline;text-underline-offset:.18em;text-decoration-thickness:1px}

/* ============ S-02 演示页外壳 ============ */
.tool-header{
  display:flex;min-height:80px;align-items:center;justify-content:space-between;
  gap:32px;padding:0 var(--gutter);
  border-bottom:1px solid var(--line);background:#fff;
}
.tool-header__brand,.tool-header__project{color:var(--ink);font-size:18px;font-weight:600}
.tool-header__brand{flex:0 0 auto}
.tool-header__project{
  min-width:0;overflow:hidden;text-align:right;text-overflow:ellipsis;white-space:nowrap;
}

/* ============ S-03 页脚（与主站一致）============ */
.site-footer{
  display:flex;align-items:center;justify-content:flex-end;
  min-height:112px;padding:0 var(--gutter);
  background:var(--white);border-top:1px solid var(--line);
}
.site-footer small{color:var(--muted);font-size:14px}



    #factory-demo{font-size:14px;line-height:1.5;color:var(--ink);background:var(--white);border:1px solid var(--line);border-radius:12px;overflow:hidden}
    #factory-demo *{box-sizing:border-box}#factory-demo button,#factory-demo input,#factory-demo select{font:inherit;color:inherit}#factory-demo button,#factory-demo select{background:var(--white);border:1px solid var(--line);border-radius:9px;padding:7px 11px;cursor:pointer}#factory-demo button:hover{background:var(--gray)}#factory-demo button:focus-visible,#factory-demo input:focus-visible,#factory-demo select:focus-visible{outline:2px solid var(--green);outline-offset:1px}#factory-demo button.main{background:var(--ink);color:var(--white);border-color:var(--ink)}#factory-demo .demo-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 20px;border-bottom:1px solid var(--line);flex-wrap:wrap}#factory-demo h1{font-size:18px;font-weight:600;margin:0}#factory-demo .sub{font-size:14px;color:var(--muted)}#factory-demo .row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}#factory-demo .layout{display:grid;grid-template-columns:minmax(0,73fr) minmax(230px,27fr)}#factory-demo .map-area{padding:16px;min-width:0}#factory-demo .map-tools{display:flex;justify-content:space-between;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:8px}#factory-demo .map-tools label{display:flex;align-items:center;gap:5px}#factory-demo .map-tools input{accent-color:var(--green)}#factory-demo .map{width:100%;display:block;aspect-ratio:800/500}#factory-demo svg text{font-family:inherit;fill:var(--ink)}#factory-demo .side{display:flex;flex-direction:column;border-left:1px solid var(--line);padding:18px 16px;min-width:0;min-height:0}#factory-demo .eyebrow{font-size:14px;color:var(--muted);margin-bottom:5px}#factory-demo .current{font-size:17px;font-weight:500;min-height:52px}#factory-demo .progress{height:4px;background:var(--gray);margin:10px 0 8px;border-radius:3px;overflow:hidden}#factory-demo .progress span{display:block;height:100%;background:var(--green)}#factory-demo .log-heading{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);padding-top:16px;margin-top:16px;margin-bottom:8px}#factory-demo .log{flex:1 1 0;min-height:0;height:0;overflow:auto;scroll-behavior:smooth}#factory-demo .event{display:block;width:100%;text-align:left;border:0;border-left:2px solid transparent;border-radius:0;padding:9px 9px;margin:2px 0;background:transparent}#factory-demo .event.active{background:var(--gray);border-left-color:var(--green)}#factory-demo .event time{display:block;font-size:14px;color:var(--muted);font-variant-numeric:tabular-nums}#factory-demo .event .event-label{display:block;font-size:14px}#factory-demo .event.done{color:var(--muted)}#factory-demo .playback{padding:14px 20px;border-top:1px solid var(--line)}#factory-demo .seek{width:100%;accent-color:var(--green);margin:10px 0 8px}#factory-demo .time{font-variant-numeric:tabular-nums;font-size:16px}#factory-demo .footer-row{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}#factory-demo details{border-top:1px solid var(--line);padding:12px 20px;font-size:14px}#factory-demo summary{cursor:pointer;color:var(--muted)}#factory-demo .settings{display:flex;gap:16px;flex-wrap:wrap;margin-top:12px}#factory-demo .settings label{display:flex;flex-direction:column;gap:4px}#factory-demo .settings input{width:115px;border:1px solid var(--line);background:var(--white);border-radius:4px;padding:5px}#factory-demo .note{color:var(--muted);margin-top:10px}#factory-demo .legend{display:flex;gap:14px;flex-wrap:wrap;font-size:14px;color:var(--muted)}#factory-demo .error{color:#A63A3A}
    @media(max-width:800px){#factory-demo .layout{grid-template-columns:1fr}#factory-demo .side{border-left:0;border-top:1px solid var(--line)}#factory-demo .log{flex:none;height:190px}#factory-demo .current{min-height:0}#factory-demo .map-area{padding:10px}#factory-demo .demo-heading,#factory-demo .playback{padding:12px}#factory-demo .sub{font-size:14px}#factory-demo .map{aspect-ratio:800/550}}
  
.tool-main{padding:32px var(--gutter) var(--space)}
#factory-demo button,#factory-demo select,#factory-demo input[type=number]{min-height:44px}
#factory-demo button,#factory-demo select{border-radius:9px}
#factory-demo .event{border-radius:0;min-height:64px}
#factory-demo .map-tools label,#factory-demo summary{min-height:44px;align-content:center}
#factory-demo button.main:hover{background:#2e3135;border-color:#2e3135}
#factory-demo button:disabled{background:#e4e7e9;color:#858a90;border-color:var(--line);opacity:1}
#factory-demo .settings{align-items:flex-end}
#factory-demo .seek{min-height:44px;display:block}
#factory-demo .map{--paper:var(--white);--soft:var(--gray);--blue:#166cbb;--bluewash:#e8f2fb;--orange:#b56a12}
#factory-demo .log{position:relative}
#fd-error:empty{display:none}
#fd-error{margin-top:12px}
#app-status{padding:16px;border:1px solid var(--line);color:var(--muted)}
[hidden]{display:none!important}
@media(max-width:800px){
.tool-header{min-height:68px;gap:20px}
.tool-header__brand,.tool-header__project{font-size:14px}
.site-footer{min-height:96px}
.tool-main{padding-top:22px}
#factory-demo .settings{display:grid;grid-template-columns:1fr}
#factory-demo .settings input{width:100%}
#factory-demo .map-area{overflow:auto}
#factory-demo .map{min-width:540px}
#factory-demo .map-tools{min-width:0}
#factory-demo details{padding:12px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important}.tool-spinner{animation:none!important}}
