/* An original Fastnesting demonstrator: SVG paths remain vector sharp.
   Styles are scoped to #fn-nesting-demo to avoid affecting calculation UI. */
#fn-nesting-demo{border-bottom:1px solid #26303b;background:radial-gradient(circle at 23% 14%,#172c2c 0,transparent 44%),linear-gradient(160deg,#0b1419,#0e1117);padding:88px 0 95px}
#fn-nesting-demo .fn-demo-intro{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(250px,.9fr);align-items:end;gap:34px;margin-bottom:30px}
#fn-nesting-demo .fn-demo-intro h2{max-width:810px;font-size:clamp(34px,4.2vw,58px);letter-spacing:-.06em;line-height:1.08;margin:14px 0 0}
#fn-nesting-demo .fn-demo-intro p{max-width:490px;color:#aab7c2;line-height:1.7;font-size:15px;margin:0 0 2px}
#fn-nesting-demo .fn-demo-frame{border:1px solid #34434c;box-shadow:0 28px 78px #0005;background:#101a20;border-radius:12px;overflow:hidden}
#fn-nesting-demo .fn-demo-frame-top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:15px;padding:17px 20px;border-bottom:1px solid #2d3c45}
#fn-nesting-demo .fn-demo-title{display:flex;align-items:center;gap:10px;color:#e8eef1;font-weight:700;letter-spacing:.01em;font-size:14px}
#fn-nesting-demo .fn-demo-title svg{color:#e8ff5a}
#fn-nesting-demo .fn-demo-file{font:500 12px ui-monospace,SFMono-Regular,Consolas,monospace;color:#a3b4be}
#fn-nesting-demo .fn-demo-canvas{padding:17px 20px 10px;background:linear-gradient(160deg,#152229,#0e1b22)}
#fn-nesting-demo .fn-demo-canvas-inner{overflow:hidden;background:#f2eee4;border:1px solid #c9c6bd;border-radius:6px;line-height:0;box-shadow:0 8px 25px #0002}
#fn-nesting-demo #fn-demo-sheet{display:block;width:100%;height:auto;max-height:490px}
#fn-nesting-demo .fn-sheet-base{fill:#f2eee5;stroke:#989e96;stroke-width:1.5}
#fn-nesting-demo .fn-sheet-grid{fill:url(#fn-demo-grid);opacity:.5}
#fn-nesting-demo .fn-sheet-remnant{fill:url(#fn-demo-hatch);opacity:.86;stroke:none}
#fn-nesting-demo .fn-sheet-boundary{stroke:#ba744e;stroke-width:1.8;stroke-dasharray:5 5;vector-effect:non-scaling-stroke}
#fn-nesting-demo .fn-nest-part{cursor:crosshair;outline:none}
#fn-nesting-demo .fn-nest-outline{fill:#e6b36a22;stroke:#d97c3a;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke;transition:fill .22s ease,stroke .22s ease}
#fn-nesting-demo .fn-nest-hole{fill:#f2eee4;stroke:#d97c3a;stroke-width:1.5;vector-effect:non-scaling-stroke}
#fn-nesting-demo .fn-nest-part:hover .fn-nest-outline,#fn-nesting-demo .fn-nest-part:focus .fn-nest-outline{fill:#f6bd6d77;stroke:#ab5f23;stroke-width:2.4}
#fn-nesting-demo .fn-nest-part:focus .fn-nest-outline{stroke-dasharray:5 3}
#fn-nesting-demo .fn-demo-meta{display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:0;border-top:1px solid #34434c;border-bottom:1px solid #34434c;background:#0e171d}
#fn-nesting-demo .fn-demo-meta-item{padding:19px 22px;border-right:1px solid #34434c}
#fn-nesting-demo .fn-demo-meta-item:last-child{border-right:0}
#fn-nesting-demo .fn-demo-meta-label{display:block;font:600 11px ui-monospace,SFMono-Regular,Consolas,monospace;color:#91a4ae;text-transform:uppercase;letter-spacing:.09em;margin-bottom:8px}
#fn-nesting-demo .fn-demo-meta-value{font:800 26px ui-monospace,SFMono-Regular,Consolas,monospace;color:#e8ff5a;font-variant-numeric:tabular-nums;letter-spacing:-.04em}
#fn-nesting-demo .fn-demo-meta-value.muted{font-size:20px;color:#f2f4f5}
#fn-nesting-demo .fn-demo-bottom{padding:18px 22px 18px;display:grid;grid-template-columns:1fr auto;gap:16px 24px;align-items:center}
#fn-nesting-demo .fn-demo-phase{font:700 12px ui-monospace,SFMono-Regular,Consolas,monospace;color:#dce6e9;letter-spacing:.05em;text-transform:uppercase}
#fn-nesting-demo .fn-demo-tip{min-height:20px;margin:5px 0 0;color:#92a2ad;font-size:12px}
#fn-nesting-demo .fn-demo-controls{display:flex;align-items:center;gap:8px}
#fn-nesting-demo .fn-demo-controls button{border:1px solid #52616a;background:#1c2c34;color:#edf5f8;font-size:12px;line-height:1;padding:11px 14px;border-radius:6px;cursor:pointer;font-weight:650;min-width:93px}
#fn-nesting-demo .fn-demo-controls button:hover{background:#29404a;border-color:#9caeb6}
#fn-nesting-demo .fn-demo-controls button:focus-visible{outline:3px solid #e8ff5a;outline-offset:3px}
#fn-nesting-demo .fn-demo-progress-track{height:4px;background:#2e3b40;grid-column:1/-1;overflow:hidden;border-radius:3px}
#fn-nesting-demo .fn-demo-progress-fill{display:block;width:0;height:100%;background:linear-gradient(90deg,#d98749,#e8ff5a);will-change:width}
#fn-nesting-demo .fn-demo-foot{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;flex-wrap:wrap;padding:16px 4px 0;color:#899ba5;font-size:12px;line-height:1.6}
#fn-nesting-demo .fn-demo-foot span{max-width:800px}
#fn-nesting-demo .fn-demo-foot a{color:#e8ff5a;text-decoration:underline;text-underline-offset:3px}
@media(max-width:880px){#fn-nesting-demo{padding:65px 0 75px}#fn-nesting-demo .fn-demo-intro{grid-template-columns:1fr;gap:14px}#fn-nesting-demo .fn-demo-intro p{max-width:780px}#fn-nesting-demo .fn-demo-meta-value{font-size:22px}}
@media(max-width:600px){#fn-nesting-demo{padding:46px 0 55px}#fn-nesting-demo .fn-demo-frame-top{padding:14px}#fn-nesting-demo .fn-demo-canvas{padding:10px 10px 7px}#fn-nesting-demo .fn-demo-meta-item{padding:12px 10px}#fn-nesting-demo .fn-demo-meta-label{font-size:9px;min-height:27px}#fn-nesting-demo .fn-demo-meta-value{font-size:17px}#fn-nesting-demo .fn-demo-meta-value.muted{font-size:15px}#fn-nesting-demo .fn-demo-bottom{padding:14px;grid-template-columns:1fr}#fn-nesting-demo .fn-demo-controls{justify-content:flex-start}#fn-nesting-demo .fn-demo-controls button{min-width:88px}#fn-nesting-demo .fn-demo-file{font-size:10px}#fn-nesting-demo .fn-demo-tip{font-size:11px}}
@media(prefers-reduced-motion:reduce){#fn-nesting-demo .fn-nest-outline{transition:none}#fn-nesting-demo .fn-demo-progress-fill{will-change:auto}}

/* Compact two-column layout: explanatory headline at left, demo card at right. */
#fn-nesting-demo{padding:58px 0 62px}
#fn-nesting-demo .fn-demo-layout{display:grid;grid-template-columns:minmax(0,.78fr) minmax(0,1.22fr);gap:clamp(20px,3vw,52px);align-items:center}
#fn-nesting-demo .fn-demo-intro{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:0;margin:0}
#fn-nesting-demo .fn-demo-intro h2{font-size:clamp(30px,3.3vw,50px);line-height:1.09;letter-spacing:-.05em;margin:16px 0 22px}
#fn-nesting-demo .fn-demo-intro p{font-size:15px;max-width:410px;line-height:1.75}
#fn-nesting-demo .fn-demo-display{min-width:0;width:100%;max-width:680px;justify-self:end}
#fn-nesting-demo .fn-demo-frame{width:100%;border-radius:10px}
#fn-nesting-demo .fn-demo-frame-top{padding:12px 15px;gap:9px}
#fn-nesting-demo .fn-demo-title{font-size:12px}
#fn-nesting-demo .fn-demo-file{font-size:10px}
#fn-nesting-demo .fn-demo-canvas{padding:11px 13px 9px}
#fn-nesting-demo #fn-demo-sheet{max-height:345px}
#fn-nesting-demo .fn-demo-meta-item{padding:13px 14px}
#fn-nesting-demo .fn-demo-meta-label{font-size:9px;margin-bottom:6px}
#fn-nesting-demo .fn-demo-meta-value{font-size:21px}
#fn-nesting-demo .fn-demo-meta-value.muted{font-size:17px}
#fn-nesting-demo .fn-demo-bottom{padding:12px 14px;gap:10px 14px}
#fn-nesting-demo .fn-demo-phase{font-size:10px}
#fn-nesting-demo .fn-demo-controls button{padding:9px 11px;min-width:75px}
#fn-nesting-demo .fn-demo-foot{font-size:11px;gap:7px;padding-top:11px}
#fn-nesting-demo .fn-demo-tip{font-size:11px}
@media(max-width:900px){
  #fn-nesting-demo .fn-demo-layout{grid-template-columns:1fr;gap:22px}
  #fn-nesting-demo .fn-demo-intro h2{font-size:clamp(31px,5vw,45px);margin-bottom:13px}
  #fn-nesting-demo .fn-demo-intro p{max-width:660px}
  #fn-nesting-demo .fn-demo-display{justify-self:start;max-width:670px}
}
@media(max-width:560px){
  #fn-nesting-demo{padding:35px 0 42px}
  #fn-nesting-demo .fn-demo-frame-top{padding:9px 10px}
  #fn-nesting-demo .fn-demo-file{font-size:9px}
  #fn-nesting-demo .fn-demo-canvas{padding:8px 8px 5px}
  #fn-nesting-demo .fn-demo-meta-item{padding:10px 7px}
  #fn-nesting-demo .fn-demo-meta-value{font-size:17px}
  #fn-nesting-demo .fn-demo-meta-value.muted{font-size:14px}
  #fn-nesting-demo .fn-demo-meta-label{font-size:8px}
  #fn-nesting-demo .fn-demo-bottom{padding:10px}
}
