.demo-banner.compact-demo-banner{align-items:center;gap:8px;padding:7px 10px;margin-bottom:13px;font-size:9px;line-height:1.35}
.compact-demo-dot{width:7px;height:7px;flex:none;border-radius:50%;background:#b4954d;box-shadow:0 0 0 3px #f1ecd8}

/* Expandable product-to-material Bill of Materials tree. */
.bom-tree-panel{margin-bottom:14px;overflow:hidden}
.bom-tree-list{padding:0 18px 16px}
.bom-tree-root{border:1px solid #edf0e9;border-radius:11px;margin-top:8px;background:#fcfdfa;overflow:hidden}
.bom-tree-root>summary{list-style:none;display:flex;align-items:center;gap:10px;min-height:54px;padding:9px 12px;cursor:pointer}
.bom-tree-root>summary::-webkit-details-marker{display:none}
.bom-tree-expander{width:16px;height:16px;color:#87938b;transition:transform .18s ease}
.bom-tree-expander svg{width:14px;height:14px}
.bom-tree-root:not([open]) .bom-tree-expander{transform:rotate(-90deg)}
.bom-tree-product-icon,.bom-tree-material-icon{width:28px;height:28px;display:grid;place-items:center;border-radius:8px;background:#eaf2e9;color:var(--green);flex:none}
.bom-tree-product-icon svg,.bom-tree-material-icon svg{width:15px;height:15px}
.bom-tree-label{display:grid;gap:3px;min-width:0}
.bom-tree-label strong{font-size:10px;color:#35433d}
.bom-tree-label small{font-size:8px;color:#929d95}
.bom-tree-type{margin-left:auto;padding:4px 7px;border-radius:15px;background:#eef3ec;color:#7c8b7d;font:500 8px 'DM Mono',monospace}
.bom-tree-children{margin:0 0 11px 38px;padding:2px 0 3px 19px;border-left:1px solid #dce7db;display:grid;gap:5px}
.bom-tree-leaf{position:relative;display:flex;align-items:center;gap:9px;min-height:46px;padding:7px 10px;border:1px solid #edf0eb;border-radius:9px;background:#fff}
.bom-tree-joint{position:absolute;left:-20px;top:50%;width:19px;border-top:1px solid #dce7db}
.bom-tree-material-icon{width:25px;height:25px;background:#f0f3ee;color:#7f9183}
.bom-tree-material-icon svg{width:13px;height:13px}
.bom-tree-quantity{margin-left:auto;color:#43594b;font:500 9px 'DM Mono',monospace;white-space:nowrap}
.bom-tree-quantity small{color:#9aa49c;font:400 8px 'DM Sans',sans-serif}
.bom-tree-empty{padding:11px;color:#9aa49c;font-size:9px}

/* Plan-level gap attribution. */
.purchase-table{min-width:780px}
.purchase-gap-cell{min-width:185px}
.gap-drilldown{margin-top:8px;white-space:normal;max-width:320px}
.gap-drilldown>summary{list-style:none;display:flex;align-items:center;gap:7px;width:max-content;max-width:100%;cursor:pointer;color:var(--green);font-size:8px;font-weight:700}
.gap-drilldown>summary::-webkit-details-marker{display:none}
.gap-drilldown>summary::before{content:'+';width:14px;height:14px;display:grid;place-items:center;border:1px solid #dce8dc;border-radius:50%;font:700 10px 'DM Mono',monospace}
.gap-drilldown[open]>summary::before{content:'−'}
.gap-drilldown>summary span{color:#99a39d;font:500 8px 'DM Mono',monospace}
.gap-drilldown-body{margin-top:8px;padding:9px;border:1px solid #edf0e9;border-radius:8px;background:#fafbf8}
.gap-total{display:grid;gap:3px;margin-bottom:6px}
.gap-total strong{color:#a95749;font-size:9px}
.gap-total small,.gap-drilldown li small{color:#939e96;font-size:8px;line-height:1.5}
.gap-drilldown ol{display:grid;gap:6px;margin:0;padding:0;list-style:none}
.gap-drilldown li{display:grid;gap:3px;padding-top:6px;border-top:1px solid #e9eee7}
.gap-path-text{color:#53665a;font-size:8.5px;line-height:1.5}
.gap-path-text b{color:#a0aaa2;padding:0 2px;font-weight:500}

/* Live, non-persistent production quantity what-if. */
.what-if-panel{margin:0 0 14px;padding:0 18px 14px}
.what-if-header{padding-left:0;padding-right:0}
.scenario-badge{padding:5px 8px;border-radius:14px;background:#eef3ec;color:#70816f;font:500 8px 'DM Mono',monospace;white-space:nowrap}
.what-if-controls{display:grid;grid-template-columns:minmax(200px,1fr) 150px;align-items:end;gap:12px 16px}
.what-if-plan-field select,.what-if-quantity-field input{height:36px;width:100%;border:1px solid #e4e9e2;border-radius:8px;padding:0 10px;background:#fff;color:#314039;font-size:10px;outline:none}
.what-if-plan-field select:focus,.what-if-quantity-field input:focus{border-color:#8bb49c;box-shadow:0 0 0 3px #e7f2e9}
.what-if-slider-label{grid-column:1/-1;display:flex;justify-content:space-between;color:#69766e;font-size:9px;font-weight:600}
.what-if-slider-label span{color:var(--green);font:500 9px 'DM Mono',monospace}
.what-if-range{grid-column:1/-1;width:100%;height:4px;margin:0 0 4px;accent-color:var(--green)}
.what-if-note{margin-top:9px;color:#939d95;font-size:8px}
.what-if-result-heading{display:flex;justify-content:space-between;gap:12px;margin-top:12px;padding-top:10px;border-top:1px solid #edf0eb;color:#56665b;font-size:9px;font-weight:600}
.what-if-result-heading span:last-child{color:#9aa39c;font-size:8px;font-weight:400}
.what-if-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:8px}
.scenario-gap-item{min-width:0;padding:9px 10px;border:1px solid #f0e9e5;border-radius:9px;background:#fffdfb}
.scenario-gap-heading{display:flex;justify-content:space-between;align-items:center;gap:7px;color:#35433d;font-size:9px;font-weight:600}
.scenario-gap-heading .status{font-size:8px;white-space:nowrap}
.scenario-gap-item .gap-drilldown{max-width:none}
.what-if-empty{padding:12px;border-radius:8px;background:#f8faf6;color:#87938b;font-size:9px}

@media(max-width:680px){
  .bom-tree-list{padding:0 11px 12px}
  .bom-tree-root>summary{gap:7px;padding:8px}
  .bom-tree-children{margin-left:27px;padding-left:13px}
  .bom-tree-joint{left:-14px;width:13px}
  .bom-tree-quantity{font-size:8px}
  .what-if-panel{padding:0 13px 12px}
  .what-if-controls{grid-template-columns:minmax(0,1fr) 110px;gap:10px}
  .what-if-results{grid-template-columns:1fr}
  .what-if-result-heading{align-items:flex-start;flex-direction:column;gap:4px}
}
