/* Page-specific styles for the pip calculator.
   Base layout, colours and the tool grid come from styles.css. */

/* Restore the standard meaning of the HTML hidden attribute.
   The shared .field rule (display: flex) would otherwise out-specify it. */
[hidden] { display: none !important; }

.span2 { grid-column: 1 / -1; }

/* ---------- results ---------- */

.results .result + .result { margin-top: 0; }

.rvalue {
  overflow-wrap: anywhere;
}

/* ---------- data table ---------- */

.pip-table {
  margin-top: 40px;
}

.pip-table h2 {
  font-size: 20px;
  margin: 0 0 12px;
}

.table-note {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 720px;
  overflow-wrap: anywhere;
  margin: 0 0 12px;
}

.pip-table .table-note:last-child {
  margin: 12px 0 0;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

#pipTable {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
  font-size: 14px;
}

#pipTable th,
#pipTable td {
  padding: 8px 12px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

#pipTable th:first-child,
#pipTable td:first-child {
  text-align: left;
}

#pipTable thead th {
  position: sticky;
  top: 0;
  background: var(--panel);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

#pipTable tbody tr:last-child td {
  border-bottom: 0;
}

#pipTable tbody tr:hover {
  background: var(--accent-soft);
}

#pipTable td.num {
  font-variant-numeric: tabular-nums;
}

#pipTable td.pair {
  font-weight: 600;
}

/* ---------- responsive ---------- */

@media (max-width: 520px) {
  .pip-table h2 { font-size: 18px; }
  #pipTable { font-size: 13px; }
  #pipTable th,
  #pipTable td { padding: 7px 9px; }
  .table-note { font-size: 13px; }
}
