/* The four Home diagrams, taken from Home_v2.html (12 Nov 2026). Colours come from site.css. */
  /* Diagram 1 */
  #d1 { position: relative; overflow: hidden; align-items: stretch; padding: 16px 14px; }
  .pieces { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .piece { border: 1px solid var(--border-strong); border-radius: 10px; padding: 8px 0; transition: all .5s; }
  .piece i { font-size: 22px; color: var(--muted); transition: color .5s; }
  .piece div { font-size: 12px; margin-top: 2px; color: var(--text-2); transition: color .5s; }
  .piece.lit { border-color: var(--accent-border); } .piece.lit i { color: var(--accent-text); }
  .piece.done i { color: var(--text-2); } .piece.done div { color: var(--text); }
  .arrows { display: flex; justify-content: center; gap: 40px; color: var(--muted); font-size: 18px; opacity: 0; transition: opacity .6s; }
  .arrows.on { opacity: 1; }
  .dna { position: relative; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 8px; padding: 14px 10px;
         display: flex; align-items: center; justify-content: center; gap: 8px; transition: border-color .6s; }
  .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent-bg); transition: width .45s ease-out; }
  .dna i, .dna span { position: relative; color: var(--muted); transition: color .6s; }
  .dna i { font-size: 22px; } .dna span { font-size: 17px; font-weight: 500; }
  .dna.on { border-color: var(--accent-border); } .dna.on i, .dna.on span { color: var(--accent-text); }
  .fly { position: absolute; font-size: 20px; color: var(--accent-text); pointer-events: none;
         transition: transform .7s cubic-bezier(.5,0,.6,1), opacity .7s; }

  /* Diagram 2 */
  .chip { background: var(--accent-bg); border: 1px solid var(--accent-border); border-radius: 8px; padding: 6px 10px;
          display: flex; align-items: center; gap: 6px; color: var(--accent-text); font-size: 13px; font-weight: 500;
          opacity: 0; transform: translateY(-10px); transition: opacity .6s, transform .6s; }
  .stage { position: relative; width: 220px; height: 150px; }
  .hx { position: absolute; left: 10px; top: 15px; filter: blur(9px); transition: filter 1.6s ease-out; }
  .hx path, .hx line { transition: stroke 1.6s ease-out; }
  .br { position: absolute; width: 20px; height: 20px; border: 0 solid #888780; opacity: .4; transition: all 1.2s cubic-bezier(.3,.7,.2,1); }
  .tl { left: -12px; top: -12px; border-top-width: 2px; border-left-width: 2px; }
  .tr { right: -12px; top: -12px; border-top-width: 2px; border-right-width: 2px; }
  .bl { left: -12px; bottom: -12px; border-bottom-width: 2px; border-left-width: 2px; }
  .bc { right: -12px; bottom: -12px; border-bottom-width: 2px; border-right-width: 2px; }
  .lbl { font-size: 15px; font-weight: 500; height: 20px; color: #888780; transition: color 1.6s; }
  #d2.chip-in .chip { opacity: 1; transform: none; }
  #d2.on .hx { filter: blur(0); }
  #d2.on .hx path { stroke: var(--accent-line) !important; }
  #d2.on .hx line { stroke: var(--accent-border) !important; }
  #d2.on .br { opacity: 1; border-color: var(--accent-line); }
  #d2.on .tl { left: 2px; top: 6px; } #d2.on .tr { right: 2px; top: 6px; }
  #d2.on .bl { left: 2px; bottom: 6px; } #d2.on .bc { right: 2px; bottom: 6px; }
  #d2.on .lbl { color: var(--accent-line); }

  /* Diagrams 3 and 4 */
  #d3, #d4 { justify-content: center; }
  .hub { position: relative; width: 256px; height: 256px; }
  .node { position: absolute; width: 80px; margin-left: -40px; margin-top: -20px; text-align: center; }
  .node .c { width: 40px; height: 40px; margin: 0 auto; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface);
             display: flex; align-items: center; justify-content: center; transition: all .6s; }
  .node .c i { font-size: 19px; color: var(--muted); transition: color .6s; }
  .node .t { font-size: 11px; color: var(--text-2); margin-top: 3px; }
  .node.on .c { border-color: var(--accent-border); background: var(--accent-bg); }
  .node.on .c i { color: var(--accent-text); }
  .core { position: absolute; left: 88px; top: 88px; width: 80px; height: 80px; border-radius: 50%; background: var(--surface);
          border: 1.5px solid var(--accent-border); display: flex; align-items: center; justify-content: center; }
  .brain { position: absolute; left: 78px; top: 78px; width: 100px; height: 100px; display: flex; align-items: center; justify-content: center; }
  .brain i { font-size: 84px; line-height: 1; color: var(--muted); opacity: .5; transform: scale(.85); transition: all .9s; }
  .brain.on i { color: var(--brain-blue); opacity: 1; transform: none; }
  .brain.pulse i { animation: pulse 3.2s ease-in-out infinite; }
  @keyframes pulse { 0%, 100% { color: var(--brain-blue); transform: scale(1); } 50% { color: var(--brain-pink); transform: scale(1.07); } }
