123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>0402N101J500CT — Component Characterization</title>
<style>
  @font-face { font-family: 'Familjen Grotesk'; src: url('https://adom.inc/fonts/familjen-grotesk/familjen-grotesk-latin-700-normal.woff2') format('woff2'); font-weight: 700; }
  @font-face { font-family: 'Familjen Grotesk'; src: url('https://adom.inc/fonts/familjen-grotesk/familjen-grotesk-latin-500-normal.woff2') format('woff2'); font-weight: 500; }
  @font-face { font-family: 'Satoshi'; src: url('https://adom.inc/fonts/satoshi/satoshi-400-normal.woff2') format('woff2'); font-weight: 400; }
  @font-face { font-family: 'Satoshi'; src: url('https://adom.inc/fonts/satoshi/satoshi-500-normal.woff2') format('woff2'); font-weight: 500; }
  @font-face { font-family: 'JetBrains Mono'; src: url('https://fonts.gstatic.com/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx3cwhsk.woff2') format('woff2'); font-weight: 400; }

  :root {
    --bg: #0d1117; --surface: #161b22; --elevated: #1c2128; --border: #30363d; --border-muted: #21262d;
    --text: #e6edf3; --text-muted: #8b949e; --text-dim: #484f58;
    --accent: #00b8b0; --accent-bright: #00e6dc; --accent-dim: rgba(0,184,176,0.12); --accent-border: rgba(0,184,176,0.25);
    --green: #3fb950; --orange: #d29922; --red: #f85149; --purple: #8C6BF7; --blue: #58a6ff;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body { font-family: 'Satoshi', sans-serif; background: var(--bg); color: var(--text); font-size: 13px; line-height: 1.6; overflow-y: auto; }
  h1,h2,h3 { font-family: 'Familjen Grotesk', sans-serif; font-weight: 700; }
  code { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
  a { color: var(--accent); text-decoration: none; }
  a:hover { color: var(--accent-bright); text-decoration: underline; }

  .header { background: var(--surface); border-bottom: 1px solid var(--border-muted); padding: 20px 24px; }
  .header-top { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
  .header .brand { color: var(--accent); font-family: 'Familjen Grotesk', sans-serif; font-size: 12px; font-weight: 600; }
  .header .vsep { width: 1px; height: 16px; background: var(--border); }
  .header .crumb { color: var(--text-dim); font-size: 12px; }
  .header h1 { font-size: 22px; margin-bottom: 2px; }
  .header h1 .val { color: var(--accent); }
  .header .subtitle { color: var(--text-muted); font-size: 13px; }
  .header .tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
  .tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 500; }
  .tag.pkg { background: rgba(0,184,176,0.12); color: var(--accent); }
  .tag.mfr { background: rgba(88,166,255,0.12); color: var(--blue); }
  .tag.series { background: rgba(140,107,247,0.12); color: var(--purple); }
  .tag.rohs { background: rgba(63,185,80,0.12); color: var(--green); }
  .tag.app { background: rgba(210,153,34,0.12); color: var(--orange); }

  .container { max-width: 1100px; margin: 0 auto; padding: 24px; }
  .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
  @media (max-width: 800px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

  .section { margin-bottom: 28px; }
  .section-title { font-size: 14px; color: var(--text); margin-bottom: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border-muted); display: flex; align-items: center; gap: 8px; }
  .section-title .icon { color: var(--accent); font-size: 16px; }

  .card { background: var(--surface); border: 1px solid var(--border-muted); border-radius: 8px; padding: 16px; }
  .card:hover { border-color: var(--accent-border); }

  .spec-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
  .spec-card { background: var(--surface); border: 1px solid var(--border-muted); border-radius: 8px; padding: 12px 14px; text-align: center; }
  .spec-card .sc-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); margin-bottom: 4px; }
  .spec-card .sc-value { font-size: 22px; font-weight: 700; font-family: 'Familjen Grotesk', sans-serif; }
  .spec-card .sc-detail { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
  .spec-card.highlight { border-color: var(--accent-border); background: linear-gradient(180deg, rgba(0,184,176,0.06), var(--surface)); }
  .spec-card.highlight .sc-value { color: var(--accent); }

  .detail-table { width: 100%; border-collapse: collapse; }
  .detail-table tr { border-bottom: 1px solid var(--border-muted); }
  .detail-table tr:last-child { border-bottom: none; }
  .detail-table td { padding: 8px 0; }
  .detail-table td:first-child { color: var(--text-muted); font-size: 12px; width: 45%; }
  .detail-table td:last-child { font-family: 'JetBrains Mono', monospace; font-size: 13px; text-align: right; }

  .chart-wrap { background: var(--surface); border: 1px solid var(--border-muted); border-radius: 8px; padding: 16px; }
  .chart-wrap h3 { font-size: 13px; color: var(--text); margin-bottom: 12px; }
  .chart-wrap .chart-note { font-size: 11px; color: var(--text-dim); margin-top: 8px; }
  svg text { font-family: 'JetBrains Mono', monospace; }

  .pkg-drawing { display: flex; align-items: center; justify-content: center; padding: 20px; }

  .family-table { width: 100%; border-collapse: collapse; font-size: 12px; }
  .family-table th { background: var(--elevated); padding: 8px 10px; text-align: left; font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); border-bottom: 2px solid var(--border); }
  .family-table td { padding: 7px 10px; border-bottom: 1px solid var(--border-muted); }
  .family-table tr.current { background: rgba(0,184,176,0.06); }
  .family-table tr.current td:first-child { border-left: 3px solid var(--accent); padding-left: 7px; }
  .family-table tr:hover td { background: var(--elevated); }

  .profile-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 12px; }
  .profile-table th { background: var(--elevated); padding: 6px 10px; font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); text-align: left; border-bottom: 1px solid var(--border); }
  .profile-table td { padding: 6px 10px; border-bottom: 1px solid var(--border-muted); }

  .env-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  @media (max-width: 700px) { .env-grid { grid-template-columns: 1fr; } }
  .env-card { background: var(--surface); border: 1px solid var(--border-muted); border-radius: 8px; padding: 12px 14px; }
  .env-card .env-name { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
  .env-card .env-spec { font-size: 11px; color: var(--text-muted); }
  .env-card .env-detail { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text); margin-top: 4px; }

  .vendor-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  @media (max-width: 700px) { .vendor-cards { grid-template-columns: 1fr; } }
  .vendor-card { background: var(--surface); border: 1px solid var(--border-muted); border-radius: 8px; padding: 14px; }
  .vendor-card .vc-name { font-size: 12px; font-weight: 600; margin-bottom: 6px; }
  .vendor-card .vc-name.mouser { color: var(--blue); }
  .vendor-card .vc-name.digikey { color: var(--red); }
  .vendor-card .vc-name.jlcpcb { color: var(--green); }
  .vendor-card .vc-price { font-size: 20px; font-weight: 700; font-family: 'Familjen Grotesk', sans-serif; }
  .vendor-card .vc-detail { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
  .vendor-card .vc-link { display: inline-block; margin-top: 8px; font-size: 11px; color: var(--accent); }
  .vendor-card.recommended { border-color: var(--accent-border); }
  .vendor-card.recommended::before { content: 'RECOMMENDED'; display: block; font-size: 9px; letter-spacing: 1px; color: var(--accent); margin-bottom: 6px; font-weight: 600; }

  .copy-btn { background: none; border: 1px solid var(--border); color: var(--text-muted); border-radius: 4px; padding: 2px 6px; font-size: 13px; cursor: pointer; font-family: 'JetBrains Mono', monospace; vertical-align: middle; transition: border-color 0.15s, color 0.15s; }
  .copy-btn:hover { border-color: var(--accent); color: var(--accent); }

  .dl-btn { display: inline-block; margin-top: 10px; padding: 6px 14px; background: var(--accent-dim); border: 1px solid var(--accent-border); border-radius: 6px; color: var(--accent); font-size: 11px; font-weight: 500; font-family: 'Satoshi', sans-serif; text-decoration: none; transition: background 0.15s, border-color 0.15s; }
  .dl-btn:hover { background: rgba(0,184,176,0.2); border-color: var(--accent); text-decoration: none; color: var(--accent-bright); }

  .open-full-banner { display: flex; align-items: center; justify-content: center; padding: 12px 24px; background: linear-gradient(90deg, rgba(0,184,176,0.12), rgba(0,184,176,0.06)); border-bottom: 1px solid var(--accent-border); }
  .open-full-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px; background: var(--accent); color: var(--bg); font-family: 'Familjen Grotesk', sans-serif; font-size: 13px; font-weight: 600; border-radius: 6px; text-decoration: none; transition: background 0.15s; }
  .open-full-btn:hover { background: var(--accent-bright); text-decoration: none; color: var(--bg); }

  .source { text-align: center; color: var(--text-dim); font-size: 11px; padding: 24px 0 12px; border-top: 1px solid var(--border-muted); margin-top: 20px; }
</style>
</head>
<body>

<div class="open-full-banner" id="fullPageBanner" style="display:none">
  <span style="color:var(--text-muted);font-size:12px;margin-right:8px">Full page:</span>
  <code style="color:var(--accent);font-size:11px;background:var(--elevated);padding:4px 8px;border-radius:4px;user-select:all">https://wiki-ufypy5dpx93o.adom.cloud/static/libraries/0402n101j500ct/0402N101J500CT.html</code>
  <button class="open-full-btn" id="copyFullUrl" style="margin-left:8px">Copy Link</button>
</div>
<script>
if(window.self!==window.top){document.getElementById('fullPageBanner').style.display='flex'}
document.getElementById('copyFullUrl').addEventListener('click',function(){var t=document.createElement('textarea');t.value='https://wiki-ufypy5dpx93o.adom.cloud/static/libraries/0402n101j500ct/0402N101J500CT.html';document.body.appendChild(t);t.select();document.execCommand('copy');document.body.removeChild(t);this.textContent='Copied!';var b=this;setTimeout(function(){b.textContent='Copy Link'},1500)});
</script>

<div class="header">
  <div class="header-top">
    <div class="brand">Adom</div>
    <div class="vsep"></div>
    <div class="crumb">Components &rsaquo; Capacitors &rsaquo; 0402</div>
  </div>
  <h1>0402N101J500CT &mdash; <span class="val">100pF</span></h1>
  <div class="subtitle">Walsin Technology Corporation &middot; Multilayer Ceramic Capacitor (MLCC) &middot; General Purpose</div>
  <div class="tags">
    <span class="tag pkg">0402</span>
    <span class="tag mfr">Walsin</span>
    <span class="tag series">NP0/C0G</span>
    <span class="tag rohs">RoHS</span>
    <span class="tag app">General Purpose</span>
  </div>
</div>

<div class="container">

  <!-- Key Specs -->
  <div class="section">
    <div class="spec-cards">
      <div class="spec-card highlight">
        <div class="sc-label">Capacitance</div>
        <div class="sc-value">100pF</div>
        <div class="sc-detail">&plusmn;5% (J)</div>
      </div>
      <div class="spec-card">
        <div class="sc-label">Rated Voltage</div>
        <div class="sc-value">50V</div>
        <div class="sc-detail">DC</div>
      </div>
      <div class="spec-card">
        <div class="sc-label">Dielectric</div>
        <div class="sc-value">NP0</div>
        <div class="sc-detail">C0G</div>
      </div>
      <div class="spec-card">
        <div class="sc-label">Temp Coeff</div>
        <div class="sc-value">&plusmn;30</div>
        <div class="sc-detail">ppm/&deg;C</div>
      </div>
      <div class="spec-card">
        <div class="sc-label">Insulation R</div>
        <div class="sc-value">10G&Omega;</div>
        <div class="sc-detail">min @ 50V DC</div>
      </div>
      <div class="spec-card">
        <div class="sc-label">Mouser</div>
        <div class="sc-value">$0.10</div>
        <div class="sc-detail">Placeholder pricing</div>
      </div>
    </div>
  </div>

  <div class="grid-2">
    <!-- Left column -->
    <div>
      <!-- Electrical Characteristics -->
      <div class="section">
        <h2 class="section-title">Electrical Characteristics</h2>
        <div class="card">
          <table class="detail-table">
            <tr><td>Capacitance</td><td>100pF &plusmn;5% (J)</td></tr>
            <tr><td>Rated Voltage</td><td>50V DC</td></tr>
            <tr><td>Dielectric Type</td><td>NP0 (C0G)</td></tr>
            <tr><td>Dissipation Factor</td><td>Q &ge; 1000 (Cap &ge; 30pF)</td></tr>
            <tr><td>Insulation Resistance</td><td>10G&Omega; or R&times;C &ge; 500&Omega;&middot;F</td></tr>
            <tr><td>Temp Coefficient</td><td>&plusmn;30 ppm/&deg;C (NP0)</td></tr>
            <tr><td>Test Voltage</td><td>1.0 &plusmn; 0.2 Vrms</td></tr>
            <tr><td>Test Frequency</td><td>1.0 MHz &plusmn; 10%</td></tr>
            <tr><td>Dielectric Strength</td><td>250% rated (125V), 1&ndash;5s</td></tr>
          </table>
        </div>
      </div>

      <!-- Operating Conditions -->
      <div class="section">
        <h2 class="section-title">Operating Conditions</h2>
        <div class="card">
          <table class="detail-table">
            <tr><td>Operating Temp</td><td>&minus;55&deg;C to +125&deg;C</td></tr>
            <tr><td>Termination</td><td>Ni/Sn (lead-free)</td></tr>
            <tr><td>Solder Compatibility</td><td>Sn-3.0Ag-0.5Cu</td></tr>
            <tr><td>Mass</td><td>~0.001g</td></tr>
          </table>
        </div>
      </div>
    </div>

    <!-- Right column -->
    <div>
      <!-- Package Drawing -->
      <div class="section">
        <h2 class="section-title">Package &amp; Dimensions</h2>
        <div class="card">
          <div class="pkg-drawing">
            <svg width="100%" height="170" viewBox="0 0 480 170">
              <!-- Top view centered at x=110 -->
              <text x="110" y="14" fill="#8b949e" font-size="10" text-anchor="middle">Top View</text>
              <rect x="45" y="22" width="130" height="65" rx="2" fill="#1c2128" stroke="#30363d" stroke-width="1.5"/>
              <rect x="45" y="22" width="25" height="65" rx="1" fill="rgba(0,184,176,0.15)" stroke="#00b8b0" stroke-width="1"/>
              <rect x="150" y="22" width="25" height="65" rx="1" fill="rgba(0,184,176,0.15)" stroke="#00b8b0" stroke-width="1"/>
              <!-- Width dim -->
              <line x1="45" y1="98" x2="175" y2="98" stroke="#484f58" stroke-width="0.5"/>
              <line x1="45" y1="94" x2="45" y2="102" stroke="#484f58" stroke-width="0.5"/>
              <line x1="175" y1="94" x2="175" y2="102" stroke="#484f58" stroke-width="0.5"/>
              <text x="110" y="114" fill="#e6edf3" font-size="10" text-anchor="middle">1.00 &plusmn; 0.05</text>
              <!-- Depth dim -->
              <line x1="185" y1="22" x2="185" y2="87" stroke="#484f58" stroke-width="0.5"/>
              <line x1="181" y1="22" x2="189" y2="22" stroke="#484f58" stroke-width="0.5"/>
              <line x1="181" y1="87" x2="189" y2="87" stroke="#484f58" stroke-width="0.5"/>
              <text x="195" y="58" fill="#e6edf3" font-size="10">0.50 &plusmn; 0.05</text>
              <!-- Terminal width -->
              <line x1="45" y1="126" x2="70" y2="126" stroke="#484f58" stroke-width="0.5" stroke-dasharray="2,2"/>
              <text x="57" y="138" fill="#8b949e" font-size="9" text-anchor="middle">0.25 &plusmn; 0.10</text>

              <!-- Side view centered at x=370 -->
              <text x="370" y="14" fill="#8b949e" font-size="10" text-anchor="middle">Side View</text>
              <rect x="305" y="28" width="130" height="55" rx="2" fill="#1c2128" stroke="#30363d" stroke-width="1.5"/>
              <rect x="305" y="28" width="22" height="55" rx="1" fill="rgba(0,184,176,0.15)" stroke="#00b8b0" stroke-width="1"/>
              <rect x="413" y="28" width="22" height="55" rx="1" fill="rgba(0,184,176,0.15)" stroke="#00b8b0" stroke-width="1"/>
              <!-- Height dim -->
              <line x1="445" y1="28" x2="445" y2="83" stroke="#484f58" stroke-width="0.5"/>
              <line x1="441" y1="28" x2="449" y2="28" stroke="#484f58" stroke-width="0.5"/>
              <line x1="441" y1="83" x2="449" y2="83" stroke="#484f58" stroke-width="0.5"/>
              <text x="455" y="59" fill="#e6edf3" font-size="10">0.50 &plusmn; 0.05</text>

              <!-- Physical specs -->
              <text x="110" y="160" fill="#8b949e" font-size="10" text-anchor="middle">0402 (1005 metric)</text>
              <text x="370" y="100" fill="#8b949e" font-size="10" text-anchor="middle">Mass: ~0.001g</text>
            </svg>
          </div>
        </div>
      </div>

      <!-- Land Pattern -->
      <div class="section">
        <h2 class="section-title">Recommended Land Pattern</h2>
        <div class="card">
          <table class="detail-table">
            <tr><td>Pad Width (a)</td><td>0.5mm</td></tr>
            <tr><td>Pad-to-Pad (b) &mdash; Reflow</td><td>1.0 to 1.2mm</td></tr>
            <tr><td>Pad-to-Pad (b) &mdash; Flow</td><td>1.4 to 1.6mm</td></tr>
            <tr><td>Pad Height (c)</td><td>0.5mm</td></tr>
            <tr><td>Solder Paste Thickness</td><td>100&ndash;125 &micro;m</td></tr>
          </table>
        </div>
      </div>
    </div>
  </div>

  <!-- Impedance vs Frequency Chart -->
  <div class="section">
    <h2 class="section-title">Impedance Behavior</h2>
    <div class="chart-wrap">
      <h3>Impedance vs. Frequency (characteristic shape for 100pF NP0/C0G capacitor)</h3>
      <svg id="impedance-chart" width="100%" height="260" viewBox="0 0 700 260">
        <!-- Grid -->
        <rect x="60" y="20" width="600" height="200" fill="#0d1117" rx="4"/>
        <line x1="60" y1="220" x2="660" y2="220" stroke="#21262d" stroke-width="1"/>
        <line x1="60" y1="170" x2="660" y2="170" stroke="#21262d" stroke-width="0.5" stroke-dasharray="4,4"/>
        <line x1="60" y1="120" x2="660" y2="120" stroke="#21262d" stroke-width="0.5" stroke-dasharray="4,4"/>
        <line x1="60" y1="70" x2="660" y2="70" stroke="#21262d" stroke-width="0.5" stroke-dasharray="4,4"/>
        <line x1="60" y1="20" x2="60" y2="220" stroke="#21262d" stroke-width="1"/>
        <!-- Vertical grid lines at freq markers -->
        <line x1="160" y1="20" x2="160" y2="220" stroke="#21262d" stroke-width="0.5" stroke-dasharray="4,4"/>
        <line x1="260" y1="20" x2="260" y2="220" stroke="#21262d" stroke-width="0.5" stroke-dasharray="4,4"/>
        <line x1="360" y1="20" x2="360" y2="220" stroke="#21262d" stroke-width="0.5" stroke-dasharray="4,4"/>
        <line x1="460" y1="20" x2="460" y2="220" stroke="#21262d" stroke-width="0.5" stroke-dasharray="4,4"/>
        <line x1="560" y1="20" x2="560" y2="220" stroke="#21262d" stroke-width="0.5" stroke-dasharray="4,4"/>

        <!-- Capacitive region (Z drops with freq) -->
        <path d="M60,29 Q89,29 118,46 Q148,46 177,62 Q206,62 235,78 Q264,78 293,95 Q322,95 352,111 Q381,111 410,127 Q439,127 468,144 Q498,144 527,160 Q556,160 585,204" stroke="#00b8b0" stroke-width="2.5" fill="none"/>
        <!-- SRF minimum -->
        <circle cx="585" cy="204" r="5" fill="#00b8b0" opacity="0.8"/>
        <!-- Inductive region (Z rises after SRF) -->
        <path d="M585,204 Q594,191 604,178 Q613,171 622,164 Q632,159 641,154 Q650,150 660,145" stroke="#f85149" stroke-width="2.5" fill="none" stroke-dasharray="6,3"/>

        <!-- SRF annotation -->
        <line x1="585" y1="204" x2="585" y2="230" stroke="#00b8b0" stroke-width="0.5" stroke-dasharray="3,3" opacity="0.5"/>
        <text x="585" y="248" fill="#00b8b0" font-size="10" text-anchor="middle">SRF: Not specified</text>

        <!-- Region labels -->
        <rect x="120" y="24" width="100" height="20" rx="4" fill="rgba(0,184,176,0.12)"/>
        <text x="170" y="38" fill="#00b8b0" font-size="10" text-anchor="middle">Capacitive</text>
        <rect x="530" y="24" width="100" height="20" rx="4" fill="rgba(248,81,73,0.12)"/>
        <text x="580" y="38" fill="#f85149" font-size="10" text-anchor="middle">Inductive</text>

        <!-- Usable range -->
        <rect x="60" y="222" width="525" height="4" rx="2" fill="rgba(63,185,80,0.3)"/>
        <text x="322" y="240" fill="#3fb950" font-size="9" text-anchor="middle">Usable range (&le; SRF)</text>

        <!-- Y axis labels -->
        <text x="55" y="224" fill="#484f58" font-size="9" text-anchor="end">398 m&Omega;</text>
        <text x="55" y="174" fill="#484f58" font-size="9" text-anchor="end">3.5 &Omega;</text>
        <text x="55" y="124" fill="#484f58" font-size="9" text-anchor="end">30.8 &Omega;</text>
        <text x="55" y="74" fill="#484f58" font-size="9" text-anchor="end">271.3 &Omega;</text>
        <text x="55" y="24" fill="#484f58" font-size="9" text-anchor="end">2.4 k&Omega;</text>
        <text x="12" y="124" fill="#484f58" font-size="9" text-anchor="middle" transform="rotate(-90,12,124)">|Z| impedance</text>

        <!-- X axis labels -->
        <text x="60" y="248" fill="#484f58" font-size="9" text-anchor="middle">1M</text>
        <text x="160" y="248" fill="#484f58" font-size="9" text-anchor="middle">3.4M</text>
        <text x="260" y="248" fill="#484f58" font-size="9" text-anchor="middle">11.4M</text>
        <text x="360" y="248" fill="#484f58" font-size="9" text-anchor="middle">38.7M</text>
        <text x="460" y="248" fill="#484f58" font-size="9" text-anchor="middle">131.0M</text>
        <text x="560" y="248" fill="#484f58" font-size="9" text-anchor="middle">443.3M</text>
        <text x="660" y="248" fill="#484f58" font-size="9" text-anchor="middle">1.5G</text>
      </svg>
      <div class="chart-note">SRF: Not specified in Walsin datasheet. Below SRF the part behaves as a capacitor; above SRF parasitic inductance dominates.</div>
    </div>
  </div>

  <!-- Reflow Soldering Profile -->
  <div class="section">
    <h2 class="section-title">Reflow Soldering Profile</h2>
    <div class="chart-wrap">
      <h3>Standard Reflow Profile</h3>
      <svg id="reflow-chart" width="100%" height="260" viewBox="0 0 700 260">
        <rect x="60" y="10" width="600" height="180" fill="#0d1117" rx="4"/>
        <line x1="60" y1="190" x2="660" y2="190" stroke="#21262d" stroke-width="1"/>
        <line x1="60" y1="10" x2="60" y2="190" stroke="#21262d" stroke-width="1"/>
        <line x1="60" y1="140" x2="660" y2="140" stroke="#21262d" stroke-width="0.5" stroke-dasharray="4,4"/>
        <line x1="60" y1="90" x2="660" y2="90" stroke="#21262d" stroke-width="0.5" stroke-dasharray="4,4"/>
        <line x1="60" y1="40" x2="660" y2="40" stroke="#21262d" stroke-width="0.5" stroke-dasharray="4,4"/>

        <path d="M80,185 L200,140 L300,140 L380,90 L420,35 L460,35 L500,90 L580,140 L660,185" stroke="#d29922" stroke-width="2.5" fill="none"/>
        <path d="M80,185 L200,140 L300,140 L370,75 L410,20 L470,20 L510,75 L580,140 L660,185" stroke="#f85149" stroke-width="1.5" fill="none" stroke-dasharray="5,4" opacity="0.6"/>

        <rect x="220" y="155" width="80" height="16" rx="3" fill="rgba(210,153,34,0.15)"/>
        <text x="260" y="167" fill="#d29922" font-size="9" text-anchor="middle">Pre-heat</text>
        <rect x="310" y="14" width="60" height="16" rx="3" fill="rgba(248,81,73,0.15)"/>
        <text x="340" y="26" fill="#f85149" font-size="9" text-anchor="middle">Peak</text>

        <text x="55" y="143" fill="#484f58" font-size="9" text-anchor="end">150&deg;C</text>
        <text x="55" y="93" fill="#484f58" font-size="9" text-anchor="end">220&deg;C</text>
        <text x="55" y="38" fill="#484f58" font-size="9" text-anchor="end">245&deg;C</text>

        <text x="480" y="17" fill="#f85149" font-size="9">260&deg;C limit</text>
        <line x1="60" y1="20" x2="660" y2="20" stroke="#f85149" stroke-width="0.5" stroke-dasharray="2,3" opacity="0.4"/>

        <line x1="200" y1="195" x2="300" y2="195" stroke="#484f58" stroke-width="1"/>
        <line x1="200" y1="191" x2="200" y2="199" stroke="#484f58" stroke-width="1"/>
        <line x1="300" y1="191" x2="300" y2="199" stroke="#484f58" stroke-width="1"/>
        <text x="250" y="207" fill="#8b949e" font-size="8" text-anchor="middle">90s &plusmn; 30s</text>

        <line x1="380" y1="95" x2="500" y2="95" stroke="#484f58" stroke-width="1"/>
        <line x1="380" y1="91" x2="380" y2="99" stroke="#484f58" stroke-width="1"/>
        <line x1="500" y1="91" x2="500" y2="99" stroke="#484f58" stroke-width="1"/>
        <text x="440" y="107" fill="#8b949e" font-size="8" text-anchor="middle">30&ndash;60s &gt;220&deg;C</text>

        <line x1="80" y1="220" x2="660" y2="220" stroke="#484f58" stroke-width="0.5"/>
        <line x1="80" y1="216" x2="80" y2="224" stroke="#484f58" stroke-width="0.5"/>
        <line x1="660" y1="216" x2="660" y2="224" stroke="#484f58" stroke-width="0.5"/>

        <text x="80" y="234" fill="#484f58" font-size="8" text-anchor="middle">0s</text>
        <text x="200" y="234" fill="#484f58" font-size="8" text-anchor="middle">~60s</text>
        <text x="300" y="234" fill="#484f58" font-size="8" text-anchor="middle">~150s</text>
        <text x="420" y="234" fill="#484f58" font-size="8" text-anchor="middle">~200s</text>
        <text x="500" y="234" fill="#484f58" font-size="8" text-anchor="middle">~240s</text>
        <text x="660" y="234" fill="#484f58" font-size="8" text-anchor="middle">~360s</text>

        <line x1="250" y1="248" x2="270" y2="248" stroke="#d29922" stroke-width="2"/>
        <text x="275" y="252" fill="#8b949e" font-size="9">Standard</text>
        <line x1="360" y1="248" x2="380" y2="248" stroke="#f85149" stroke-width="1.5" stroke-dasharray="4,3"/>
        <text x="385" y="252" fill="#8b949e" font-size="9">Limit</text>
      </svg>
      <table class="profile-table">
        <thead><tr><th>Phase</th><th>Standard</th><th>Limit</th></tr></thead>
        <tbody>
          <tr><td>Pre-heating</td><td>150&ndash;180&deg;C, 90s &plusmn; 30s</td><td>Same</td></tr>
          <tr><td>Heating</td><td>Above 220&deg;C, 30&ndash;60s</td><td>Above 230&deg;C, 60s max</td></tr>
          <tr><td>Peak Temperature</td><td>245&deg;C &plusmn; 3&deg;C</td><td>260&deg;C, 10s</td></tr>
          <tr><td>Cycles</td><td colspan="2">2 times max</td></tr>
        </tbody>
      </table>
    </div>
  </div>

  <!-- Environmental & Reliability -->
  <div class="section">
    <h2 class="section-title">Environmental &amp; Reliability</h2>
    <div class="env-grid">
      <div class="env-card">
        <div class="env-name">Adhesive Strength</div>
        <div class="env-spec">No damage</div>
        <div class="env-detail">5N (&le;0603), 10s hold</div>
      </div>
      <div class="env-card">
        <div class="env-name">Vibration</div>
        <div class="env-spec">No damage</div>
        <div class="env-detail">10&ndash;55Hz, 1.5mm amp, 2h&times;3 axes (6h total)</div>
      </div>
      <div class="env-card">
        <div class="env-name">Solderability</div>
        <div class="env-spec">&ge;95% metallized area</div>
        <div class="env-detail">235 &plusmn; 5&deg;C, 2 &plusmn; 0.5s dip</div>
      </div>
      <div class="env-card">
        <div class="env-name">Bending Test</div>
        <div class="env-spec">&Delta;C &le; &plusmn;5% or 0.5pF</div>
        <div class="env-detail">1mm deflection (NP0, whichever larger)</div>
      </div>
      <div class="env-card">
        <div class="env-name">Soldering Heat</div>
        <div class="env-spec">&Delta;C &le; &plusmn;2.5% or 0.25pF</div>
        <div class="env-detail">260 &plusmn; 5&deg;C, 10 &plusmn; 1s dip (NP0)</div>
      </div>
      <div class="env-card">
        <div class="env-name">Temperature Cycle</div>
        <div class="env-spec">&Delta;C &le; &plusmn;2.5% or 0.25pF</div>
        <div class="env-detail">5 cycles, &minus;55&deg;C &harr; +125&deg;C, 30min each</div>
      </div>
      <div class="env-card">
        <div class="env-name">Insulation Resistance</div>
        <div class="env-spec">10G&Omega; min (NP0)</div>
        <div class="env-detail">50V DC, 25&deg;C</div>
      </div>
      <div class="env-card">
        <div class="env-name">Dielectric Strength</div>
        <div class="env-spec">No damage</div>
        <div class="env-detail">250% rated voltage (125V), 1&ndash;5s</div>
      </div>
    </div>
  </div>

  <!-- Symbol, Footprint & 3D View -->
  <div class="section">
    <h2 class="section-title">Symbol, Footprint &amp; 3D Model</h2>
    <div class="grid-2" style="margin-bottom:12px">
      <!-- Interactive SymView -->
      <div class="card" style="padding:0;overflow:hidden">
        <div style="font-size:12px;font-weight:500;text-transform:uppercase;letter-spacing:0.5px;color:var(--text-dim);padding:12px 16px 0">Schematic Symbol</div>
        <iframe src="0402N101J500CT-symview.html" style="width:100%;height:340px;border:none;display:block" allow="fullscreen"></iframe>
      </div>
      <!-- Interactive FpView -->
      <div class="card" style="padding:0;overflow:hidden">
        <div style="font-size:12px;font-weight:500;text-transform:uppercase;letter-spacing:0.5px;color:var(--text-dim);padding:12px 16px 0">Footprint (0402) &mdash; with solder jetting layout</div>
        <iframe src="0402N101J500CT-fpview.html" style="width:100%;height:340px;border:none;display:block" allow="fullscreen"></iframe>
      </div>
    </div>
    <!-- 3D Model -->
    <div class="card" style="text-align:center;margin-bottom:12px">
      <div style="font-size:12px;font-weight:500;text-transform:uppercase;letter-spacing:0.5px;color:var(--text-dim);margin-bottom:12px">3D Model (interactive)</div>
      <canvas id="viewer3d" width="600" height="300" style="width:100%;height:300px;border-radius:4px;cursor:grab"></canvas>
      <div style="font-size:10px;color:var(--text-dim);margin-top:6px">Click &amp; drag to rotate &middot; Scroll to zoom</div>
    </div>
    <!-- Download / Export Bar -->
    <div class="card" style="display:flex;align-items:center;gap:10px;flex-wrap:wrap">
      <span style="font-size:11px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.5px">Export:</span>
      <a class="dl-btn" href="https://wiki-ufypy5dpx93o.adom.cloud/static/libraries/0402n101j500ct/0402N101J500CT.kicad_sym" download>KiCad Symbol (.kicad_sym)</a>
      <a class="dl-btn" href="https://wiki-ufypy5dpx93o.adom.cloud/static/libraries/0402n101j500ct/0402N101J500CT.kicad_mod" download>KiCad Footprint (.kicad_mod)</a>
      <a class="dl-btn" href="https://wiki-ufypy5dpx93o.adom.cloud/static/libraries/0402n101j500ct/0402N101J500CT.lbr" download>Fusion 360 (.lbr)</a>
      <a class="dl-btn" href="https://wiki-ufypy5dpx93o.adom.cloud/static/libraries/0402n101j500ct/0402N101J500CT.step" download>3D Model (.step)</a>
    </div>
  </div>

  <!-- Pricing & Availability -->
  <div class="section">
    <h2 class="section-title">Pricing &amp; Availability</h2>
    <div class="vendor-cards">
      <div class="vendor-card recommended">
        <div class="vc-name mouser">Mouser Electronics</div>
        <div class="vc-price">$0.10</div>
        <div class="vc-detail">Placeholder pricing</div>
        <div class="vc-detail">PN: 0402N101J500CT</div>
        <a class="vc-link" href="https://www.mouser.com/Search/Refine?Keyword=0402N101J500CT" target="_blank">View on Mouser &rarr;</a>
      </div>
      <div class="vendor-card">
        <div class="vc-name digikey">DigiKey</div>
        <div class="vc-price">$0.10</div>
        <div class="vc-detail">Placeholder pricing</div>
        <div class="vc-detail">PN: 0402N101J500CT</div>
        <a class="vc-link" href="https://www.digikey.com/en/products/filter?keywords=0402N101J500CT" target="_blank">View on DigiKey &rarr;</a>
      </div>
      <div class="vendor-card">
        <div class="vc-name jlcpcb">JLCPCB / LCSC</div>
        <div class="vc-price">&mdash;</div>
        <div class="vc-detail">Not listed</div>
        <div class="vc-detail">&nbsp;</div>
      </div>
    </div>
  </div>

  <!-- Datasheet -->
  <div class="section">
    <h2 class="section-title">Documents</h2>
    <div class="card">
      <table class="detail-table">
        <tr><td>Datasheet</td><td><button class="copy-btn" title="Copy link to clipboard" id="ds-copy-btn">&#x2398;</button>
<script>document.getElementById('ds-copy-btn').addEventListener('click',function(){var t=document.createElement('textarea');t.value='https://www.mouser.com/datasheet/3/317/1/WTC_MLCC_General_Purpose.pdf';document.body.appendChild(t);t.select();document.execCommand('copy');document.body.removeChild(t);this.textContent='Copied!';var b=this;setTimeout(function(){b.innerHTML='&#x2398;'},1500)})</script> <a href="https://www.mouser.com/datasheet/3/317/1/WTC_MLCC_General_Purpose.pdf" target="_blank">ASC_General Purpose Series, May 2026 (PDF) &rarr;</a></td></tr>
        <tr><td>Spec Number</td><td>ASC_General Purpose Series, May 2026</td></tr>
        <tr><td>Manufacturer</td><td>Walsin Technology Corporation</td></tr>
        <tr><td>Inventory Source</td><td><a href="https://inventory-2w8z8d9ojzzl.adom.cloud" target="_blank">Adom Parts Inventory &rarr;</a></td></tr>
      </table>
    </div>
  </div>

  <!-- Molecule -->
  <div class="section">
    <h2 class="section-title">Molecule &mdash; Single-Passive Board</h2>
    <div class="card" style="padding:0;overflow:hidden;border-radius:8px">
      <div style="font-size:12px;font-weight:500;text-transform:uppercase;letter-spacing:0.5px;color:var(--text-dim);padding:12px 16px 0">Interactive 3D Board Viewer</div>
      <iframe src="https://wiki-ufypy5dpx93o.adom.cloud/static/libraries/0402n101j500ct/tsci-viewer/molecule-viewer/index.html"
              style="width:100%;height:500px;border:none;border-radius:0 0 8px 8px;display:block"
              allow="fullscreen"></iframe>
    </div>
    <div style="font-size:11px;color:var(--text-dim);margin-top:8px;text-align:center">
      Orbit: click &amp; drag &middot; Zoom: scroll &middot; Inspect: click a component &middot; X-ray: toggle in toolbar
    </div>
  </div>

  <div class="source">
    0402N101J500CT characterization &middot; Data from Walsin datasheet ASC_General Purpose Series + adom-parts-search &middot; 2026-06-03
  </div>

</div>

<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<script>
(function() {
  // 3D Viewer — 0402N101J500CT (0402 MLCC capacitor)
  const canvas = document.getElementById('viewer3d');
  if (canvas && window.THREE) {
    const scene = new THREE.Scene();

    const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true, logarithmicDepthBuffer: true });
    renderer.setSize(canvas.width, canvas.height);
    renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
    renderer.outputEncoding = THREE.sRGBEncoding;
    renderer.toneMapping = THREE.ACESFilmicToneMapping;
    renderer.toneMappingExposure = 1.2;
    renderer.physicallyCorrectLights = true;

    canvas.style.background = 'linear-gradient(180deg, #5a6b7e 0%, #2a3340 100%)';

    const camera = new THREE.PerspectiveCamera(35, canvas.width / canvas.height, 0.01, 1000);

    const pmremGen = new THREE.PMREMGenerator(renderer);
    pmremGen.compileEquirectangularShader();
    const envScene = new THREE.Scene();
    envScene.background = new THREE.Color(0x3a4550);
    const envLight1 = new THREE.DirectionalLight(0xffffff, 2);
    envLight1.position.set(1, 3, 2);
    envScene.add(envLight1);
    const envLight2 = new THREE.DirectionalLight(0x8899bb, 1);
    envLight2.position.set(-2, 1, -1);
    envScene.add(envLight2);
    const envRT = pmremGen.fromScene(envScene, 0.04);
    scene.environment = envRT.texture;

    const hemi = new THREE.HemisphereLight(0xe6edf3, 0xb3a699, 0.5);
    scene.add(hemi);
    const keyLight = new THREE.DirectionalLight(0xffffff, 1.5);
    keyLight.position.set(2, 5, 3);
    scene.add(keyLight);
    const fillLight = new THREE.DirectionalLight(0x8899aa, 0.5);
    fillLight.position.set(-3, 2, -2);
    scene.add(fillLight);
    const rimLight = new THREE.DirectionalLight(0x00b8b0, 0.3);
    rimLight.position.set(0, -1, 3);
    scene.add(rimLight);

    const S = 2.0;

    // PBR Materials
    const bodyMat = new THREE.MeshStandardMaterial({ color: 0xc4a882, metalness: 0.0, roughness: 0.55 });
    const termMat = new THREE.MeshStandardMaterial({ color: 0xc8ccd1, metalness: 1.0, roughness: 0.25,
      polygonOffset: true, polygonOffsetFactor: -1, polygonOffsetUnits: -1 });
    const padMat = new THREE.MeshStandardMaterial({ color: 0xc9a04c, metalness: 1.0, roughness: 0.22 });
    const pcbMat = new THREE.MeshStandardMaterial({ color: 0x0a2a0a, metalness: 0.0, roughness: 0.6 });

    // Body: 1.0 x 0.5 x 0.50 mm (0402)
    const bodyW = 1.0, bodyD = 0.5, bodyH = 0.50;
    const termW = 0.25;
    const innerW = bodyW - termW * 2 + 0.02;
    const body = new THREE.Mesh(new THREE.BoxGeometry(innerW*S, bodyH*S, bodyD*S), bodyMat);
    body.position.y = bodyH*S/2;
    scene.add(body);

    const termH = bodyH;
    function makeTerminal(xSign) {
      const group = new THREE.Group();
      const front = new THREE.Mesh(new THREE.BoxGeometry(termW*S, termH*S, bodyD*S*0.99), termMat);
      front.position.set(xSign*(bodyW/2 - termW/2)*S, termH*S/2, 0);
      group.add(front);
      const bot = new THREE.Mesh(new THREE.BoxGeometry((termW+0.04)*S, 0.05*S, bodyD*S*0.99), termMat);
      bot.position.set(xSign*(bodyW/2 - termW/2)*S, 0.025*S, 0);
      group.add(bot);
      const top = new THREE.Mesh(new THREE.BoxGeometry((termW+0.04)*S, 0.05*S, bodyD*S*0.99), termMat);
      top.position.set(xSign*(bodyW/2 - termW/2)*S, (bodyH-0.025)*S, 0);
      group.add(top);
      return group;
    }
    scene.add(makeTerminal(-1));
    scene.add(makeTerminal(1));

    const pcb = new THREE.Mesh(new THREE.BoxGeometry(12*S, 0.08*S, 10*S), pcbMat);
    pcb.position.y = -0.04*S;
    scene.add(pcb);

    const pad1 = new THREE.Mesh(new THREE.BoxGeometry(0.5*S, 0.025*S, 0.5*S), padMat);
    pad1.position.set(-0.45*S, 0.005*S, 0);
    scene.add(pad1);
    const pad2 = new THREE.Mesh(new THREE.BoxGeometry(0.5*S, 0.025*S, 0.5*S), padMat);
    pad2.position.set(0.45*S, 0.005*S, 0);
    scene.add(pad2);

    const gridMat2 = new THREE.LineBasicMaterial({ color: 0x0d3d0d, transparent: true, opacity: 0.3 });
    for (let i = -10; i <= 10; i++) {
      const pts1 = [new THREE.Vector3(i*0.5*S, 0.045*S, -5*S), new THREE.Vector3(i*0.5*S, 0.045*S, 5*S)];
      scene.add(new THREE.Line(new THREE.BufferGeometry().setFromPoints(pts1), gridMat2));
      const pts2 = [new THREE.Vector3(-5*S, 0.045*S, i*0.5*S), new THREE.Vector3(5*S, 0.045*S, i*0.5*S)];
      scene.add(new THREE.Line(new THREE.BufferGeometry().setFromPoints(pts2), gridMat2));
    }

    let isDragging = false, prevX = 0, prevY = 0;
    let theta = Math.PI/4, phi = Math.PI/5.5, radius = 4.5;
    const target = new THREE.Vector3(0, 0.4, 0);

    function updateCamera() {
      camera.position.x = radius * Math.sin(theta) * Math.cos(phi);
      camera.position.y = radius * Math.sin(phi) + target.y;
      camera.position.z = radius * Math.cos(theta) * Math.cos(phi);
      camera.lookAt(target);
    }
    updateCamera();

    canvas.addEventListener('mousedown', e => { isDragging = true; prevX = e.clientX; prevY = e.clientY; canvas.style.cursor = 'grabbing'; });
    window.addEventListener('mouseup', () => { isDragging = false; canvas.style.cursor = 'grab'; });
    canvas.addEventListener('mousemove', e => {
      if (!isDragging) return;
      theta -= (e.clientX - prevX) * 0.008;
      phi = Math.max(0.05, Math.min(Math.PI/2.2, phi + (e.clientY - prevY) * 0.008));
      prevX = e.clientX; prevY = e.clientY;
      updateCamera();
    });
    canvas.addEventListener('wheel', e => {
      e.preventDefault();
      radius = Math.max(2, Math.min(10, radius + e.deltaY * 0.004));
      updateCamera();
    }, { passive: false });

    function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); }
    animate();
  }

  function setupChartTooltip(svgId, dataPoints, color, formatX, formatY) {
    const svg = document.getElementById(svgId);
    if (!svg) return;

    const ns = 'http://www.w3.org/2000/svg';

    const dot = document.createElementNS(ns, 'circle');
    dot.setAttribute('r', '5');
    dot.setAttribute('fill', color);
    dot.setAttribute('stroke', '#0d1117');
    dot.setAttribute('stroke-width', '2');
    dot.style.display = 'none';
    dot.style.pointerEvents = 'none';
    svg.appendChild(dot);

    const tipGroup = document.createElementNS(ns, 'g');
    tipGroup.style.display = 'none';
    tipGroup.style.pointerEvents = 'none';

    const tipBg = document.createElementNS(ns, 'rect');
    tipBg.setAttribute('rx', '4');
    tipBg.setAttribute('fill', '#161b22');
    tipBg.setAttribute('stroke', '#30363d');
    tipBg.setAttribute('stroke-width', '1');

    const tipLine1 = document.createElementNS(ns, 'text');
    tipLine1.setAttribute('font-family', 'JetBrains Mono, monospace');
    tipLine1.setAttribute('font-size', '10');
    tipLine1.setAttribute('fill', '#e6edf3');

    const tipLine2 = document.createElementNS(ns, 'text');
    tipLine2.setAttribute('font-family', 'JetBrains Mono, monospace');
    tipLine2.setAttribute('font-size', '10');
    tipLine2.setAttribute('fill', color);

    tipGroup.appendChild(tipBg);
    tipGroup.appendChild(tipLine1);
    tipGroup.appendChild(tipLine2);
    svg.appendChild(tipGroup);

    const vLine = document.createElementNS(ns, 'line');
    vLine.setAttribute('stroke', color);
    vLine.setAttribute('stroke-width', '0.5');
    vLine.setAttribute('stroke-dasharray', '3,3');
    vLine.setAttribute('opacity', '0.5');
    vLine.style.display = 'none';
    vLine.style.pointerEvents = 'none';
    svg.appendChild(vLine);

    function lerp(pts, svgX) {
      if (svgX <= pts[0].sx) return pts[0];
      if (svgX >= pts[pts.length-1].sx) return pts[pts.length-1];
      for (let i = 0; i < pts.length - 1; i++) {
        if (svgX >= pts[i].sx && svgX <= pts[i+1].sx) {
          const t = (svgX - pts[i].sx) / (pts[i+1].sx - pts[i].sx);
          return {
            sx: svgX,
            sy: pts[i].sy + t * (pts[i+1].sy - pts[i].sy),
            vx: pts[i].vx + t * (pts[i+1].vx - pts[i].vx),
            vy: pts[i].vy + t * (pts[i+1].vy - pts[i].vy),
          };
        }
      }
      return pts[0];
    }

    svg.addEventListener('mousemove', function(e) {
      const pt = svg.createSVGPoint();
      pt.x = e.clientX;
      pt.y = e.clientY;
      const svgPt = pt.matrixTransform(svg.getScreenCTM().inverse());

      const minX = dataPoints[0].sx;
      const maxX = dataPoints[dataPoints.length-1].sx;
      if (svgPt.x < minX - 10 || svgPt.x > maxX + 10) {
        dot.style.display = 'none';
        tipGroup.style.display = 'none';
        vLine.style.display = 'none';
        return;
      }

      const p = lerp(dataPoints, svgPt.x);

      dot.setAttribute('cx', p.sx);
      dot.setAttribute('cy', p.sy);
      dot.style.display = '';

      vLine.setAttribute('x1', p.sx);
      vLine.setAttribute('y1', p.sy);
      vLine.setAttribute('x2', p.sx);
      vLine.setAttribute('y2', 220);
      vLine.style.display = '';

      const xLabel = formatX(p.vx);
      const yLabel = formatY(p.vy);
      tipLine1.textContent = xLabel;
      tipLine2.textContent = yLabel;

      const tipX = p.sx + 12;
      const tipY = p.sy - 28;
      const boxW = Math.max(xLabel.length, yLabel.length) * 7 + 16;
      const boxH = 32;

      const adjustedX = tipX + boxW > 660 ? p.sx - boxW - 12 : tipX;
      const adjustedY = tipY < 10 ? p.sy + 12 : tipY;

      tipBg.setAttribute('x', adjustedX);
      tipBg.setAttribute('y', adjustedY);
      tipBg.setAttribute('width', boxW);
      tipBg.setAttribute('height', boxH);

      tipLine1.setAttribute('x', adjustedX + 8);
      tipLine1.setAttribute('y', adjustedY + 13);
      tipLine2.setAttribute('x', adjustedX + 8);
      tipLine2.setAttribute('y', adjustedY + 26);

      tipGroup.style.display = '';
    });

    svg.addEventListener('mouseleave', function() {
      dot.style.display = 'none';
      tipGroup.style.display = 'none';
      vLine.style.display = 'none';
    });
  }

  // Impedance chart data for 100pF C0G capacitor
  const impedanceData = [
    {sx:60, sy:29, vx:1000000, vy:1591.5},
    {sx:118, sy:46, vx:2035558, vy:781.9},
    {sx:177, sy:62, vx:4143496, vy:384.1},
    {sx:235, sy:78, vx:8434327, vy:188.7},
    {sx:293, sy:95, vx:17168561, vy:92.7},
    {sx:352, sy:111, vx:34947600, vy:45.5},
    {sx:410, sy:127, vx:71137866, vy:22.4},
    {sx:468, sy:144, vx:144805249, vy:11.0},
    {sx:527, sy:160, vx:294759478, vy:5.4},
    {sx:585, sy:204, vx:600000000, vy:0.8},
    {sx:604, sy:178, vx:754460058, vy:2.4},
    {sx:622, sy:164, vx:948683298, vy:4.5},
    {sx:641, sy:154, vx:1192906093, vy:7.1},
    {sx:660, sy:145, vx:1500000000, vy:10.3},
  ];

  function fmtFreq(f) {
    if (f >= 1e9) return (f/1e9).toFixed(1) + ' GHz';
    if (f >= 1e6) return (f/1e6).toFixed(1) + ' MHz';
    return (f/1e3).toFixed(0) + ' kHz';
  }
  function fmtZ(z) {
    if (z >= 1000) return (z/1000).toFixed(2) + ' k\u03A9';
    if (z >= 1) return z.toFixed(1) + ' \u03A9';
    return (z*1000).toFixed(0) + ' m\u03A9';
  }

  setupChartTooltip('impedance-chart', impedanceData, '#00b8b0', fmtFreq, function(z) { return '|Z| = ' + fmtZ(z); });

  // Reflow chart data
  const reflowData = [
    {sx:80,  sy:185, vx:0,   vy:25},
    {sx:200, sy:140, vx:60,  vy:150},
    {sx:300, sy:140, vx:150, vy:150},
    {sx:380, sy:90,  vx:195, vy:220},
    {sx:420, sy:35,  vx:210, vy:245},
    {sx:460, sy:35,  vx:225, vy:245},
    {sx:500, sy:90,  vx:240, vy:220},
    {sx:580, sy:140, vx:280, vy:150},
    {sx:660, sy:185, vx:360, vy:25},
  ];

  function fmtTime(t) { return t.toFixed(0) + 's'; }
  function fmtTemp(t) { return t.toFixed(0) + '\u00B0C'; }

  const reflowLimit = [
    {sx:80,  sy:185, vx:0,   vy:25},
    {sx:200, sy:140, vx:60,  vy:150},
    {sx:300, sy:140, vx:150, vy:150},
    {sx:370, sy:75,  vx:190, vy:230},
    {sx:410, sy:20,  vx:205, vy:260},
    {sx:470, sy:20,  vx:230, vy:260},
    {sx:510, sy:75,  vx:250, vy:230},
    {sx:580, sy:140, vx:280, vy:150},
    {sx:660, sy:185, vx:360, vy:25},
  ];

  const reflowCurves = [
    { data: reflowData,  color: '#d29922', label: 'Standard' },
    { data: reflowLimit, color: '#f85149', label: 'Limit' },
  ];

  (function setupReflowMultiCurve() {
    const svg = document.getElementById('reflow-chart');
    if (!svg) return;
    const ns = 'http://www.w3.org/2000/svg';
    let activeIdx = 0;

    const dot = document.createElementNS(ns, 'circle');
    dot.setAttribute('r', '5');
    dot.setAttribute('stroke', '#0d1117');
    dot.setAttribute('stroke-width', '2');
    dot.style.display = 'none';
    dot.style.pointerEvents = 'none';
    svg.appendChild(dot);

    const vLine = document.createElementNS(ns, 'line');
    vLine.setAttribute('stroke-width', '0.5');
    vLine.setAttribute('stroke-dasharray', '3,3');
    vLine.setAttribute('opacity', '0.5');
    vLine.style.display = 'none';
    vLine.style.pointerEvents = 'none';
    svg.appendChild(vLine);

    const tipGroup = document.createElementNS(ns, 'g');
    tipGroup.style.display = 'none';
    tipGroup.style.pointerEvents = 'none';
    const tipBg = document.createElementNS(ns, 'rect');
    tipBg.setAttribute('rx', '4');
    tipBg.setAttribute('fill', '#161b22');
    tipBg.setAttribute('stroke', '#30363d');
    tipBg.setAttribute('stroke-width', '1');
    const tipLine1 = document.createElementNS(ns, 'text');
    tipLine1.setAttribute('font-family', 'JetBrains Mono, monospace');
    tipLine1.setAttribute('font-size', '10');
    tipLine1.setAttribute('fill', '#e6edf3');
    const tipLine2 = document.createElementNS(ns, 'text');
    tipLine2.setAttribute('font-family', 'JetBrains Mono, monospace');
    tipLine2.setAttribute('font-size', '10');
    const tipLine3 = document.createElementNS(ns, 'text');
    tipLine3.setAttribute('font-family', 'JetBrains Mono, monospace');
    tipLine3.setAttribute('font-size', '9');
    tipLine3.setAttribute('fill', '#484f58');
    tipGroup.appendChild(tipBg);
    tipGroup.appendChild(tipLine1);
    tipGroup.appendChild(tipLine2);
    tipGroup.appendChild(tipLine3);
    svg.appendChild(tipGroup);

    function setActive(idx) {
      activeIdx = idx;
      const c = reflowCurves[idx];
      dot.setAttribute('fill', c.color);
      vLine.setAttribute('stroke', c.color);
      tipLine2.setAttribute('fill', c.color);
    }
    setActive(0);

    function lerp(pts, svgX) {
      if (svgX <= pts[0].sx) return pts[0];
      if (svgX >= pts[pts.length-1].sx) return pts[pts.length-1];
      for (let i = 0; i < pts.length - 1; i++) {
        if (svgX >= pts[i].sx && svgX <= pts[i+1].sx) {
          const t = (svgX - pts[i].sx) / (pts[i+1].sx - pts[i].sx);
          return {
            sx: svgX,
            sy: pts[i].sy + t * (pts[i+1].sy - pts[i].sy),
            vx: pts[i].vx + t * (pts[i+1].vx - pts[i].vx),
            vy: pts[i].vy + t * (pts[i+1].vy - pts[i].vy),
          };
        }
      }
      return pts[0];
    }

    svg.addEventListener('click', function() {
      setActive((activeIdx + 1) % reflowCurves.length);
    });

    svg.addEventListener('mousemove', function(e) {
      const pt = svg.createSVGPoint();
      pt.x = e.clientX; pt.y = e.clientY;
      const svgPt = pt.matrixTransform(svg.getScreenCTM().inverse());
      const c = reflowCurves[activeIdx];
      const minX = c.data[0].sx, maxX = c.data[c.data.length-1].sx;
      if (svgPt.x < minX - 10 || svgPt.x > maxX + 10) {
        dot.style.display = 'none'; tipGroup.style.display = 'none'; vLine.style.display = 'none';
        return;
      }
      const p = lerp(c.data, svgPt.x);
      dot.setAttribute('cx', p.sx); dot.setAttribute('cy', p.sy); dot.style.display = '';
      vLine.setAttribute('x1', p.sx); vLine.setAttribute('y1', p.sy);
      vLine.setAttribute('x2', p.sx); vLine.setAttribute('y2', 195); vLine.style.display = '';

      const xLabel = fmtTime(p.vx);
      const yLabel = 'Temp = ' + fmtTemp(p.vy);
      const curveLabel = 'Click to switch \u2022 ' + c.label;
      tipLine1.textContent = xLabel;
      tipLine2.textContent = yLabel;
      tipLine3.textContent = curveLabel;

      const tipX = p.sx + 12, tipY = p.sy - 38;
      const boxW = Math.max(xLabel.length, yLabel.length, curveLabel.length) * 6.5 + 16;
      const boxH = 44;
      const adjustedX = tipX + boxW > 660 ? p.sx - boxW - 12 : tipX;
      const adjustedY = tipY < 10 ? p.sy + 12 : tipY;

      tipBg.setAttribute('x', adjustedX); tipBg.setAttribute('y', adjustedY);
      tipBg.setAttribute('width', boxW); tipBg.setAttribute('height', boxH);
      tipLine1.setAttribute('x', adjustedX + 8); tipLine1.setAttribute('y', adjustedY + 13);
      tipLine2.setAttribute('x', adjustedX + 8); tipLine2.setAttribute('y', adjustedY + 26);
      tipLine3.setAttribute('x', adjustedX + 8); tipLine3.setAttribute('y', adjustedY + 39);
      tipGroup.style.display = '';
    });

    svg.addEventListener('mouseleave', function() {
      dot.style.display = 'none'; tipGroup.style.display = 'none'; vLine.style.display = 'none';
    });

    svg.style.cursor = 'pointer';
  })();
})();
</script>
</div>
</body>
</html>