  /* Assembly table demo: extras on top of /assets/pergola.css (same stand palette, same layout). */

  /* ---- step navigation (pinned at the top of the panel, sticky under the 3D view on phones) ---- */
  .steps { display:grid; grid-template-columns:repeat(6, minmax(0,1fr)); gap:4px; padding:10px 12px; background:var(--bg); box-shadow:0 1px 0 var(--line); position:relative; z-index:4; }
  .steps button { display:flex; flex-direction:column; align-items:center; gap:3px; padding:7px 2px 6px; border:1.5px solid var(--line-strong); border-radius:2px; background:var(--card); cursor:pointer; min-width:0; }
  .steps .n { width:20px; height:20px; display:grid; place-items:center; border-radius:2px; background:var(--line-strong); color:var(--ink); font-size:11.5px; font-weight:800; }
  .steps .l { font-size:11.5px; font-weight:650; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
  .steps button[aria-current=step] { border-color:var(--accent); background:var(--accent-soft); }
  .steps button[aria-current=step] .n { background:var(--accent); color:#fff; }
  @media (hover:hover) and (pointer:fine) { .steps button:hover { border-color:var(--ink); } }

  .card > header h2 { font-size:16px; }
  .grid1 { display:grid; grid-template-columns:1fr; gap:8px; }

  /* ---- tiles / segments / switches that are not possible now: greyed, with the reason ---- */
  .tile.off, .seg button.off { opacity:.55; cursor:not-allowed; border-style:dashed; }
  .tile .why { font-size:11px; line-height:1.25; color:var(--warn); }
  .tile .swatch { width:30px; height:30px; }
  .why { color:var(--warn); font-size:12px; line-height:1.35; margin:6px 0 0; }
  .acc.off .n { color:var(--muted); }
  .switch:disabled { opacity:.45; cursor:not-allowed; }

  /* ---- rule / warning / info lines ---- */
  .notes { display:flex; flex-direction:column; gap:6px; margin-top:12px; }
  .notes p { margin:0; padding:8px 10px; font-size:12.5px; line-height:1.4; border-left:3px solid; }
  .note-info { background:var(--bg); border-color:var(--line-strong); color:var(--muted); }
  .note-rule { background:var(--warn-bg); border-color:#d9b400; color:var(--warn); }
  .note-warn { background:var(--danger-bg); border-color:var(--danger); color:var(--danger); }
  .hint { margin:0 0 10px; }

  /* ---- add buttons ---- */
  .chips { display:flex; flex-wrap:wrap; gap:8px; margin:4px 0 6px; }
  .chipcell { display:flex; flex-direction:column; gap:3px; max-width:100%; }
  .chipcell.off { max-width:170px; }
  .chip-btn { padding:8px 12px; border:1.5px solid var(--ink); border-radius:2px; background:var(--card); font-size:13px; font-weight:650; cursor:pointer; min-height:38px; }
  .chipcell.off .chip-btn { border-color:var(--line-strong); border-style:dashed; color:var(--muted); cursor:not-allowed; }
  .chipcell .why { margin:0; font-size:11px; }
  @media (hover:hover) and (pointer:fine) { .chipcell:not(.off) .chip-btn:hover { background:var(--accent); border-color:var(--accent); color:#fff; } }

  /* ---- item lists ---- */
  .items { border:1px solid var(--line-strong); border-radius:2px; margin-top:10px; overflow:hidden; }
  .item { display:flex; align-items:center; gap:6px; padding:8px 10px; border-top:1px solid var(--line); cursor:pointer; background:var(--card); }
  .item:first-child { border-top:0; }
  .item.sel { background:var(--accent-soft); box-shadow:inset 3px 0 0 var(--accent); }
  @media (hover:hover) and (pointer:fine) { .item:not(.sel):hover { background:var(--bg); } }
  .item .txt { flex:1; min-width:0; font-size:13.5px; line-height:1.3; }
  .item .txt span { color:var(--muted); }
  .item .txt small { display:block; color:var(--faint); font-size:12px; }
  .mini { flex:none; width:32px; height:32px; border:1.5px solid var(--line-strong); border-radius:2px; background:var(--card); cursor:pointer; font-size:12px; }
  @media (hover:hover) and (pointer:fine) { .mini:hover { border-color:var(--ink); } }
  .selbox { margin-top:12px; padding:12px 12px 4px; border:1.5px solid var(--accent); border-radius:2px; background:linear-gradient(var(--accent-soft), transparent 60px); }
  .selhead { font-weight:750; font-size:13.5px; color:var(--accent); margin-bottom:4px; }
  .selbox .sub:first-of-type { margin-top:8px; }

  /* ---- load on the uprights ---- */
  .loadbar { margin-top:14px; font-size:13px; }
  .loadbar .row { display:flex; justify-content:space-between; margin-bottom:5px; color:var(--muted); }
  .loadbar .bar { height:6px; background:var(--line); border-radius:99px; overflow:hidden; }
  .loadbar .bar i { display:block; height:100%; background:var(--accent); }
  .loadbar.over .bar i { background:var(--danger); }
  .loadbar.over b { color:var(--danger); }

  /* ---- ergonomics ---- */
  .facts { display:grid; grid-template-columns:auto 1fr; gap:6px 14px; margin:0 0 14px; font-size:14px; }
  .facts dt { color:var(--muted); }
  .facts dd { margin:0; }
  .ergobar { position:relative; height:28px; background:var(--line); border-radius:2px; }
  .ergobar i { position:absolute; top:0; bottom:0; }
  .ergobar .range { background:#c9d3ff; }
  .ergobar .rec { background:#2bb673; opacity:.8; }
  .ergobar .sit { width:3px; background:#f0a020; }
  .ergobar .now { width:0; top:-4px; bottom:-4px; border-left:3px solid var(--ink); transition:left .08s linear; }
  .legend { color:var(--faint); font-size:11.5px; margin:6px 0 12px; }
  .btnrow { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 4px; }
  .btnrow .btn:disabled { opacity:.5; cursor:not-allowed; }
  .sources { color:var(--faint); font-size:11.5px; line-height:1.45; margin:14px 0 0; }
  .zone { display:inline-flex; align-items:center; gap:4px; margin-right:12px; }

  /* ---- summary ---- */
  .kv { display:grid; grid-template-columns:minmax(110px, auto) 1fr; gap:6px 14px; margin:0; font-size:13.5px; }
  .kv dt { color:var(--muted); }
  .kv dd { margin:0; }
  .tablewrap { overflow-x:auto; }
  .bom { width:100%; border-collapse:collapse; font-size:12.5px; }
  .bom th { text-align:left; color:var(--muted); font-weight:700; padding:4px 6px 6px 0; border-bottom:2px solid var(--ink); }
  .bom td { padding:6px 6px 6px 0; border-bottom:1px solid var(--line); vertical-align:top; }
  .bom td small { display:block; color:var(--faint); font-size:11px; }
  .bom .r { text-align:right; white-space:nowrap; }
  .bom .tot td { font-weight:800; border-bottom:0; }

  /* ---- back / next ---- */
  .stepnav { display:flex; justify-content:space-between; gap:10px; padding:4px 2px 8px; }
  .stepnav .btn { min-height:40px; padding:8px 14px; font-size:14px; }
  .stepnav .primary { margin-left:auto; padding:8px 16px; }
  .breakdown .row span:first-child { min-width:0; }

  #sitBtn:disabled { opacity:.45; cursor:not-allowed; }

  @media (max-width: 900px) {
    .steps { position:sticky; top:calc(var(--bar, 0px) + 46vh); z-index:4; padding:8px 10px; box-shadow:0 -1px 0 var(--bg), 0 1px 0 var(--line); }
  }

  @media (max-width: 640px) {
    .steps { top:calc(var(--bar, 0px) + 40vh); padding:8px; gap:3px; }
    /* phones: numbers only; the current step is wider and also shows its name */
    .steps { display:flex; }
    .steps button { flex:1 1 0; }
    .steps .l { display:none; font-size:11.5px; }
    .steps button[aria-current=step] { flex:3 1 0; flex-direction:row; justify-content:center; gap:6px; }
    .steps button[aria-current=step] .l { display:block; }
    .steps button { padding:5px 1px 4px; }
    .stepnav .btn { min-height:38px; padding:7px 12px; font-size:13.5px; }
    .stepnav .primary { padding:7px 14px; }
    .kv { grid-template-columns:1fr; gap:2px 0; }
    .kv dd { margin-bottom:6px; }
  }
