/* The specification panel.
 *
 * Every colour and face is a design token WITH A FALLBACK to the value the
 * current site already uses:
 *
 *   var(--ww-ink, #0C1E13)
 *
 * That is what lets one component serve both design states. With the
 * `design_tokens` toggle off, tokens.css never loads, the custom properties are
 * undefined and the fallbacks apply — the panel matches the site as it stands
 * today. Turn the toggle on and the same markup picks up the 2026 palette and
 * IBM Plex with no second stylesheet and no duplicated rules.
 *
 * The alternative — ship the panel only when the new design is on — would have
 * meant building the most useful component on the site and leaving it invisible.
 */

.ww-spec {
  margin: 24px 0;
  border-top: 1px solid var(--ww-ink, #0C1E13);
}

.ww-spec__heading {
  font-family: var(--ww-font-mono, 'Montserrat', sans-serif);
  font-size: var(--ww-text-xs, 0.75rem);
  letter-spacing: var(--ww-tracking-label, 0.12em);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ww-c-label, #4F4F4F);
  margin: 12px 0 4px;
}

.ww-spec__table {
  width: 100%;
  border-collapse: collapse;
  /* Wide values must scroll inside the panel, never widen the column. */
  table-layout: auto;
}

/* style.css styles EVERY table on the site:
 *
 *   table th, table td { padding: 12px 15px; border: 1px solid #ddd; }
 *   table th          { background-color: #f7f7f7; font-weight: 600; }
 *
 * A `border-bottom` alone does not undo a four-sided `border` shorthand, so
 * the cells came out boxed, and the label column came out grey. Both are reset
 * explicitly here rather than left to specificity — this panel is a spec sheet,
 * and a hairline between rows is the whole visual idea.
 */
.ww-spec__table th,
.ww-spec__table td {
  text-align: left;
  vertical-align: top;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--ww-rule, #E6E6E6);
  background: none;
  font-size: var(--ww-text-sm, 0.875rem);
  line-height: 1.45;
}

/* The label is prose; the value is data. Keeping them in different faces is
 * the point of the panel — a column of thicknesses is only comparable at a
 * glance in tabular figures. */
.ww-spec__table th {
  width: 44%;
  font-family: var(--ww-font-sans, 'Montserrat', sans-serif);
  font-weight: 400;
  color: var(--ww-ink-2, #4F4F4F);
  background: none;
  padding-right: 16px;
}

.ww-spec__table td {
  font-family: var(--ww-font-mono, 'Montserrat', sans-serif);
  font-variant-numeric: tabular-nums;
  color: var(--ww-ink, #0C1E13);
  overflow-wrap: anywhere;
}

.ww-spec__table tr:last-child th,
.ww-spec__table tr:last-child td {
  border-bottom: 0;
}

/* Narrow screens: a 44% label column leaves too little for a value like
 * "Concealed micro-tenon (finger joint)", so the pair stacks instead. */
@media screen and (max-width: 480px) {
  .ww-spec__table th,
  .ww-spec__table td {
    display: block;
    width: auto;
    padding-right: 0;
  }

  .ww-spec__table th {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .ww-spec__table td {
    padding-top: 2px;
  }
}

/* The quote-list quantity rules used to live here — "rather than in a fourth
 * stylesheet", when the pair was three rules. They are popups.css's now: that
 * sheet owns the drawer they sit inside, and a specification panel and a quote
 * list are two components, not one. */
