/* periodic-table — tool CSS. Chunk 6b retired the layout rules onto the
   design system (§29 studio layout, --top-props variant, and the
   Chunk 1 .tabs for the details drawer): the unit toggle, check
   labels, and the detail-panel box (the drawer tab panel is the
   container now). What is left here is tool-specific: the table grid
   and cells, the category filter and colour legend, the list view,
   the detail fields and Bohr diagram, and the worked-example row. */
.tool-body .example-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 16px 0 0;
}
.tool-body .example-row label {
  font-weight: 700;
}
.tool-body .example-row select {
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--lg-line);
  border-radius: 10px;
  background: var(--lg-surface);
  color: var(--lg-ink);
  font: inherit;
  flex: 1 1 220px;
}
.tool-body .pt-legend-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  font-size: 13px;
  color: var(--lg-muted);
}
.tool-body .pt-legend-box .sw {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--lg-line);
  border-radius: 999px;
  padding: 4px 12px;
  background: var(--lg-surface);
  color: var(--lg-ink);
}
.tool-body .pt-legend-box .chip {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 6px;
  border: 1px solid var(--lg-line);
}
.tool-body .pat-dots {
  background-image: radial-gradient(rgba(22,35,58,.45) 1.5px, transparent 1.5px);
  background-size: 8px 8px;
}
.tool-body .pat-stripes {
  background-image: repeating-linear-gradient(45deg, rgba(22,35,58,.35) 0 2px, transparent 2px 7px);
}
.tool-body .pt-list-row {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 12px 12px;
  border: 1px solid var(--lg-line);
  border-radius: 10px;
  background: var(--lg-surface);
  color: var(--lg-ink);
  font: inherit;
  cursor: pointer;
  margin-bottom: 8px;
  min-height: 44px;
}
.tool-body .pt-list-row:hover, .tool-body .pt-list-row:focus-visible {
  outline: 3px solid var(--lg-accent);
}
.tool-body .pt-list-row .z {
  font-weight: 700;
  color: var(--lg-muted);
  width: 32px;
}
.tool-body .pt-list-row .s {
  font-weight: 800;
  width: 44px;
}
.tool-body .bohr {
  margin-top: 12px;
}
.tool-body .bohr svg {
  display: block;
}
.tool-body .pt-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--lg-line);
  border-radius: 10px;
  background: var(--lg-surface);
  padding: 12px;
}
.tool-body .pt-grid {
  display: grid;
  grid-template-columns: repeat(18, minmax(52px, 1fr));
  gap: 4px;
  min-width: 1004px; /* Chunk 8: 18 columns x 52px + 17 gaps x 4px, so the
                        12px mass number (e.g. 107.868) fits inside a cell */
}
.tool-body .pt-cell {
  border: 1px solid var(--lg-line);
  border-radius: 6px;
  padding: 8px 4px 4px;
  text-align: center;
  cursor: pointer;
  min-height: 52px;
  background: var(--soft);
}
.tool-body .pt-cell .z {
  display: block;
  font-size: 12px;
  color: var(--tile-ink);
  line-height: 1.1;
}
.tool-body .pt-cell .s {
  display: block;
  font-size: 16px;
  font-weight: 700;
  /* Chunk 9 (test 12): the symbol keeps the dark tile ink in both modes,
     like .z and .w below — the cells keep their light category colours
     in dark mode too, so the light --lg-ink was unreadable on them. */
  color: var(--tile-ink);
  line-height: 1.15;
}
.tool-body .pt-cell .w {
  display: block;
  font-size: 12px;
  color: var(--tile-ink);
  line-height: 1.1;
}
.tool-body .pt-cell.sel {
  outline: 3px solid var(--lg-accent);
  outline-offset: 1px;
}
.tool-body .pt-cell.dim {
  opacity: 0.25;
}
.tool-body .pt-empty {
  visibility: hidden;
}
.tool-body .pt-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--lg-muted);
  text-align: center;
}
.tool-body .pt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.tool-body .pt-legend button {
  border: 1px solid var(--lg-line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  background: var(--lg-surface);
  color: var(--lg-ink);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}
.tool-body .pt-legend button.active {
  outline: 2px solid var(--lg-accent);
}
.tool-body .pt-detail h3 {
  margin-top: 0;
  font-size: 24px;
}
.tool-body .pt-detail .big-sym {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}
.tool-body .pt-detail dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  margin: 12px 0;
}
.tool-body .pt-detail dt {
  font-weight: 700;
  color: var(--lg-muted);
}
.tool-body .pt-detail dd {
  margin: 0;
}
/* The "Use in Molecular Weight Calculator" link is a button in the
   280px drawer: let its label wrap onto two lines instead of
   running off the panel edge. */
.tool-body .studio-props #useInMW {
  white-space: normal;
  height: auto;
  min-height: 36px;
  line-height: 1.3;
  text-align: left;
}

/* Chunk 9 (test 8): the gap between the main block and the f-block keeps
   its height by class now, not by an inline style. */
.tool-body .pt-gap {
  height: 12px;
}
