
:root{
  --bg:#0f1420;
  --panel:#121827;
  --ink:#e7ecf5;
  --muted:#9fb0c7;
  --primary:#4ea3ff;
  --outline:#2a3550;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; font:16px/1.45 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial;
  color:var(--ink); background:var(--bg);
}
.container{max-width:980px;margin:40px auto;padding:0 16px}
.page-header{
  width:100%;
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  background-image: url("img/jumbotron-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  gap: 0;
}
.page-header h1,
.page-header .subtitle,
.page-header .helper{
  text-align:center;
  width:100%;
}

header{ }
header h1{margin:0 0 10px;font-weight:700;font-size:28px}
.subtitle{margin:0 0 8px;font-size:15px;font-weight:600;color:var(--muted)}
.helper{color:var(--muted);font-size:16px;font-weight:bold;margin:4px 0 0}
.panel{background:var(--panel);border:1px solid var(--outline);border-radius:14px;padding:18px}

.nav{display:flex;gap:8px;justify-content:space-between;align-items:center;margin:18px 0}
.btn{padding:10px 16px;border-radius:10px;border:1px solid var(--outline);background:#162033;color:var(--ink);cursor:pointer}
.btn[disabled]{opacity:.5;cursor:not-allowed}
.btn-primary{background:var(--primary);border-color:var(--primary);color:#081221}

.step{display:none}
.step.active{display:block}
.section-title{margin:0 0 10px;font-size:22px}
.small{font-size:13px}
.muted{color:var(--muted)}

.grid{display:grid;gap:12px}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
/* Step 5: left diagram wider */
.alt-diagrams{ grid-template-columns: 1.45fr 1fr; }
@media (max-width: 860px){ .grid-2, .alt-diagrams{ grid-template-columns:1fr } }

.tile-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
.tile{display:block;user-select:none}
.tile input{position:absolute;opacity:0;width:1px;height:1px;margin:-1px;padding:0;border:0;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden}
.tile-body{background:#121620;border:1px solid var(--outline);border-radius:14px;overflow:hidden;transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease;cursor:pointer}
.tile-body img{width:100%;height:160px;object-fit:cover;display:block}
.tile-title{padding:10px 12px;font-weight:600}
.tile:hover .tile-body{transform:translateY(-1px)}
#step-shellstyle .tile input:checked + .tile-body, #step-shellstyle .tile.selected .tile-body{border-color:var(--primary);box-shadow:0 0 0 2px var(--primary)}

.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
label span{display:block;margin:0 0 6px}
select,input[type="number"],input[type="text"],input[type="email"]{width:100%;padding:10px 12px;border-radius:10px;border:1px solid var(--outline);background:#0f1420;color:var(--ink)}

.summary{background:#0f1625;border:1px dashed var(--outline);border-radius:14px;padding:14px;margin-top:12px}
.summary dl{display:grid;grid-template-columns:160px 1fr;gap:8px;margin:0}
.summary dt{color:var(--muted)}
.summary dd{margin:0}

/* Step 4 diagram + charts */
.diagram-pane{background:#0f1625;border:1px solid var(--outline);border-radius:14px;padding:12px;display:flex;flex-direction:column;gap:8px}
.diagram-pane img{width:100%;height:auto;border-radius:10px;display:block}
.caption{color:var(--muted);font-size:12px}
.ref-charts{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}
.table-lite{width:100%;border-collapse:collapse;font-size:14px}
.table-lite th,.table-lite td{border:1px solid var(--outline);padding:6px 8px;text-align:center;background:#121620}
.table-lite thead th{background:#1d2a44;color:#eaf3ff}
.table-lite thead th.legend{background:#3a3f48}
.contact-legend{display:grid;grid-template-columns:repeat(6, 1fr);gap:6px}
.contact-card{background:#121620;border:1px solid var(--outline);border-radius:10px;padding:8px}
.contact-card img{width:42px;height:42px;display:block;margin:0 auto 6px auto}
.contact-card .lbl{font-size:12px;color:var(--muted);text-align:center}

.img-card{background:#0f1625;border:1px solid var(--outline);border-radius:14px;padding:10px}
.img-card img{width:100%;height:auto;display:block;border-radius:10px}

.insert-explainer{margin:6px 0 8px}
.alt-explainer{ font-size: 1.2em; line-height: 1.35; }


/* v18: Longer sliders on Step 6 */
#step-pcb #rangeExtensionLength,
#step-pcb #pinTailLength{
  width: 100%;
  max-width: 640px; /* adjust as needed */
  display: block;
}


/* v-step6 white background for image + widget */
.pcb-panel{
  background:#ffffff !important;
  color:#000000;
}

/* Center Step 2 shell images and make them ~25% larger */
#step-shellstyle img {
  display: inline-block;
  margin: 12px 8px;
  max-width: 200px;
  height: auto;
}

/* Container for Step 2 shell images: keep them on one line and centered */
.shellstyle-images {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}


/* --- Header centering hard override (in case other rules win) --- */
.container{
  margin-left:auto !important;
  margin-right:auto !important;
}
.page-header{
  display:block !important;
  width:100% !important;
  text-align:center !important;
}
.page-header *{
  text-align:center !important;
}
.page-header h1,
.page-header .subtitle{
  margin-left:auto !important;
  margin-right:auto !important;
}


/* ===== Header centering (hard override) ===== */
.site-header{
  width:100% !important;
  text-align:center !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  box-sizing:border-box !important;
  padding:26px 16px 14px !important;
}
.site-header h1,
.site-header .subtitle,
.site-header .helper{
  width:100% !important;
  text-align:center !important;
  margin-left:auto !important;
  margin-right:auto !important;
}
.site-header h1{display:block !important;}
/* =========================================================
   Step 2 – Service Class (boxed, clearly separated options)
   Targets only the Service Class step: #step-serviceclass
   ========================================================= */
#step-serviceclass .panel{padding:0 !important;} /* keep their inline intent consistent */

#step-serviceclass .serviceclass-table{
  width:100%;
  border-collapse:separate;   /* allow spacing between option cards */
  border-spacing:0 12px;      /* vertical gap between rows */
  margin:0;
}

#step-serviceclass .serviceclass-table tbody{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:12px;               /* breathing room inside the panel */
}

#step-serviceclass .serviceclass-table tr{
  /* turn each option into a “card” */
  display:grid;
  grid-template-columns: 44px 44px 1fr;
  align-items:center;
  gap:10px;

  padding:14px 14px;
  background:#0f1625;
  border:1px solid var(--outline);
  border-radius:14px;

  cursor:default;
  transition: border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}

#step-serviceclass .serviceclass-table tr:hover{
  border-color:#3a4b6f;
  box-shadow:0 0 0 2px rgba(78,163,255,.12);
}

#step-serviceclass .serviceclass-table td{
  border:none !important;
  padding:0 !important;
  background:transparent !important;
}

#step-serviceclass .serviceclass-table td:nth-child(1){
  display:flex;
  justify-content:center;
  align-items:center;
}

#step-serviceclass .serviceclass-table input[type="radio"]{
  width:20px;
  height:20px;
  accent-color:var(--primary);
}

#step-serviceclass .serviceclass-table td:nth-child(2){
  /* The letter (C, E, F, ...) */
  display:flex;
  justify-content:center;
  align-items:center;
  font-weight:800;
  font-size:16px;
  letter-spacing:.5px;
  width:44px;
  height:44px;
  border-radius:10px;
  background:#121a2b;
  border:1px solid var(--outline);
}

#step-serviceclass .serviceclass-table td:nth-child(3){
  /* Description */
  text-align:center;
  font-size:14px;
  line-height:1.35;
  color:var(--ink);
}

/* Selected state (Chrome/Edge/Safari support :has()) */
#step-serviceclass .serviceclass-table tr:has(input[type="radio"]:checked){
  border-color:var(--primary);
  box-shadow:0 0 0 2px rgba(78,163,255,.25);
}

#step-serviceclass .serviceclass-table tr:has(input[type="radio"]:checked) td:nth-child(2){
  border-color:var(--primary);
  box-shadow:0 0 0 2px rgba(78,163,255,.18);


}

/* === Step 2: Known Part Number mode === */
#step-pickpath .path-choices > div{ cursor:pointer; }

.knownpn-panel{
  background: var(--panel);
  border: 1px solid var(--outline);
  border-radius: 14px;
  padding: 14px;
  margin: 14px 0;
}
.knownpn-label{ display:block; }
.knownpn-label span{
  display:block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}
#knownPartNumberInput{
  width:100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--outline);
  background: #0e1526;
  color: var(--ink);
  outline: none;
}
#knownPartNumberInput:focus{
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(78,163,255,.15);
}
.knownpn-status{
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}
.knownpn-status.ok{ color:#7ce7a6; }
.knownpn-status.bad{ color:#ff8a8a; }


/* Step 4: Insert arrangement PDF button outline */
#btnInsertArrangements{
  border: 2px solid #1e6cff; /* blue outline */
}
#btnInsertArrangements:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(30,108,255,0.25);
}


/* Results: Pinout legend + grid (match charting system visual language) */
.pinout-legend{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.pinout-legend-item{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.75);
  font-size: 12px;
  line-height: 1;
}

.pinout-legend-swatch{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
}

.pinout-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.pin{
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.72);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

.pin:hover{
  border-color: rgba(30,108,255,0.45);
}

.pin-num{
  font-weight: 700;
  font-size: 12px;
  color: #111827;
}

.pin-status{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.08);
  color: #111827;
  background: rgba(243,244,246,0.9);
  max-width: 100%;
}

.pin-status.filtered{
  /* Readable on light tints; actual background/border are set inline per capacitor color */
  color: #111827;
  border-left: 6px solid var(--pinColor, #4e79a7);
}
.pin-status.ground{
  /* Shorted to Shell / Ground pins */
  background: rgba(17,24,39,0.92);
  border-color: rgba(17,24,39,0.92);
  color: #ffffff;
}

.pin-status.untreated{
  background: rgba(243,244,246,0.95);
  color: #374151;
}
/* Make pinout legend labels readable */
.pinout-legend,
.pinout-legend-item{
  color: #000;
}

/* Step 10: Final Pinout Diagram - larger description text */
#pinoutDescription{
  font-size: 16px !important;
  line-height: 1.5;
  color: #ffffff;}


/* Step 8: Lightning/transient note styling */
#step-voltage .panel.lightning-note{
  border: 1px solid rgba(241, 196, 15, 0.28);
}

#step-voltage .lightning-note-text{
  margin: 0;
  text-align: center;
  font-size: 16px;
  line-height: 1.45;
  color: #f1c40f;
}

#step-voltage .lightning-note-text::before{
  content: "⚡";
  display: inline-block;
  margin-right: 6px;
  font-size: 14px;
  line-height: 1;
  vertical-align: baseline;
  color: #f1c40f;
}

/* Step 10 notes in Design Summary */
.note-box{ margin-top: 10px; border: 1px solid rgba(255,255,255,0.28); padding: 10px 12px; border-radius: 10px; }


/* Step 2 (Known PN): confirmation sub-page */
#step2KnownPanel .knownpn-confirm-text{
  margin: 12px 0 0;
  text-align: center;
  font-size: 18px;
  line-height: 1.4;
}
