/* Wire Comparison tool — page-specific styles.
 * Relies on global tokens (--ink, --ink-soft, --muted, --accent, --bg,
 * --bg-alt, --sans, --mono) and shared classes (.btn-*, .form-grid, .f). */

.wc-picker {
  background: var(--bg-alt);
  border: 1px solid rgba(10, 25, 41, 0.10);
  border-radius: 14px;
  padding: clamp(16px, 2vw, 22px);
  margin-bottom: 22px;
}
.wc-picker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
}
.wc-picker-field { display: flex; flex-direction: column; gap: 6px; }
.wc-picker-field > span {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.wc-picker-field select {
  font-family: var(--sans);
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid rgba(10, 25, 41, 0.18);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  min-width: 140px;
}
.wc-picker-hint { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

/* Custom-wire form */
.wc-custom {
  border: 1px solid rgba(10, 25, 41, 0.12);
  border-radius: 14px;
  padding: clamp(18px, 2.2vw, 26px);
  margin-bottom: 22px;
}
.wc-custom-head h2 { margin: 4px 0 6px; font-size: clamp(19px, 1.5vw + 0.4rem, 23px); }
.wc-custom-head p { margin: 0 0 18px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.6; max-width: 64ch; }
.wc-opt { text-transform: none; color: var(--muted); font-weight: 400; }
.wc-c-bool { display: flex; align-items: center; }
.wc-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-soft); cursor: pointer; }
.wc-check input { width: 16px; height: 16px; }
.wc-custom-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 18px; }

/* Empty state */
.wc-empty {
  border: 1px dashed rgba(10, 25, 41, 0.22);
  border-radius: 14px;
  padding: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}
.wc-empty strong { color: var(--ink); }

/* Comparison table */
.wc-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  margin-bottom: 8px;
}
.wc-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 480px;
  font-size: 14px;
}
.wc-table th, .wc-table td {
  border-bottom: 1px solid rgba(10, 25, 41, 0.08);
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
}
/* Frozen first column — spec labels stay put while the wire columns scroll.
   z-index ladder: scrolling cells (auto) < frozen body (2) < group bar (3)
   < top-left corner (4), so frozen pieces always paint over scrolling ones. */
.wc-rowhead, .wc-corner {
  position: sticky;
  left: 0;
  background: var(--bg);
  font-weight: 500;
  color: var(--ink-soft);
  min-width: 150px;
}
.wc-rowhead { z-index: 2; }
.wc-corner  { z-index: 4; }
/* A soft right-edge shadow marks the freeze line so scrolling cells clearly
   read as passing *under* the frozen column. */
.wc-rowhead::after, .wc-corner::after {
  content: "";
  position: absolute;
  top: 0; bottom: -1px; right: 0;
  width: 6px;
  transform: translateX(100%);
  pointer-events: none;
  background: linear-gradient(to right, rgba(10, 25, 41, 0.12), rgba(10, 25, 41, 0));
}
.wc-corner { color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.wc-col { position: relative; min-width: 150px; background: var(--bg-alt); border-bottom: 2px solid rgba(10, 25, 41, 0.12); }
.wc-col-title { display: block; font-weight: 600; color: var(--ink); font-size: 15px; padding-right: 18px; }
.wc-col-trade { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--muted); margin-top: 2px; }
.wc-col-remove {
  position: absolute; top: 8px; right: 8px;
  width: 22px; height: 22px; line-height: 1;
  border: 1px solid rgba(10, 25, 41, 0.18); border-radius: 6px;
  background: var(--bg); color: var(--muted); font-size: 16px; cursor: pointer;
}
.wc-col-remove:hover { color: var(--accent); border-color: var(--accent); }
.wc-colbadge {
  display: inline-block; margin-top: 8px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: 5px; padding: 2px 6px;
}
.wc-colbadge-user { color: var(--accent); background: rgba(232, 95, 0, 0.10); }

.wc-grouprow th.wc-grouphead {
  position: sticky; left: 0; z-index: 3;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 14px;
}
.wc-cell .wc-val { color: var(--ink); }
.wc-cell.is-best { background: rgba(232, 95, 0, 0.07); }
.wc-cell.is-best .wc-val { color: var(--accent); font-weight: 600; }
.wc-na { color: rgba(10, 25, 41, 0.35); }

/* "Your figure" chip — marks a value the user entered, kept distinct from our specs */
.wc-chip {
  display: inline-block; margin-left: 4px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 5px; white-space: nowrap; vertical-align: middle;
}
.wc-chip-user { color: var(--accent); background: rgba(232, 95, 0, 0.10); }

/* Standard info marker */
.wc-info {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; margin-left: 5px;
  border: 1px solid rgba(10, 25, 41, 0.3); border-radius: 50%;
  font-family: var(--mono); font-size: 9px; font-style: normal; color: var(--muted);
  cursor: help; vertical-align: middle;
}
.wc-info:hover, .wc-info:focus { border-color: var(--accent); color: var(--accent); outline: none; }

/* Small screens — tighten the table so the frozen column leaves room to read
   the wire columns, and hint that the table scrolls sideways. */
@media (max-width: 560px) {
  .wc-table { font-size: 13px; }
  .wc-table th, .wc-table td { padding: 9px 11px; }
  .wc-rowhead, .wc-corner { min-width: 120px; }
  .wc-col { min-width: 124px; }
  .wc-col-title { font-size: 14px; }
}

/* Actions */
.wc-actions { display: flex; justify-content: flex-end; margin: 18px 0 0; }

/* Insight */
.wc-insight { margin-top: 40px; }
.wc-insight-title { margin: 4px 0 18px; font-size: clamp(20px, 1.6vw + 0.4rem, 25px); }
.wc-insight-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 720px) { .wc-insight-cards { grid-template-columns: 1fr; } }
.wc-insight-card {
  border: 1px solid rgba(10, 25, 41, 0.12);
  border-radius: 12px;
  padding: 18px 20px;
  background: var(--bg);
}
.wc-insight-card h3 { margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--ink); }
.wc-insight-card p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--ink-soft); }
.wc-insight-card em { font-style: normal; font-family: var(--mono); font-size: 12px; }
.wc-insight-empty { color: var(--muted); font-size: 14.5px; }

/* Standards reference */
.wc-standards { margin-top: 40px; border-top: 1px solid rgba(10, 25, 41, 0.1); padding-top: 24px; }
.wc-standards-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; cursor: pointer;
  background: none; border: none; padding: 6px 0;
  font-family: var(--sans); font-size: clamp(17px, 1.3vw + 0.3rem, 20px); font-weight: 600; color: var(--ink);
}
.wc-standards-toggle svg { transition: transform 0.2s ease; flex: none; color: var(--muted); }
.wc-standards-toggle.is-open svg { transform: rotate(180deg); }
.wc-std-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; margin: 18px 0 0; }
@media (max-width: 720px) { .wc-std-list { grid-template-columns: 1fr; } }
.wc-std-item dt { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.wc-std-title { font-family: var(--sans); font-weight: 400; color: var(--muted); font-size: 12.5px; }
.wc-std-item dd { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }

/* Fineprint */
.wc-fineprint {
  margin-top: 36px;
  border-top: 1px solid rgba(10, 25, 41, 0.1);
  padding-top: 20px;
  display: grid;
  gap: 12px;
  max-width: 80ch;
}
.wc-fineprint p { margin: 0; font-size: 13px; line-height: 1.65; color: var(--muted); }
.wc-fineprint strong { color: var(--ink-soft); }
.wc-fineprint a { color: var(--accent); }
