/* !
 * rs-ptable.css  ·  Interactive periodic table  ·  v1.9
 * v1.9 (18 Nov 2026): the buttons use the site control job classes from rs-page.css (.ct-act solid navy actions, .ct-chip choose-one,
 * .ct-switch on/off). Magnifier, Build a compound and Find the element are switches; the underlined text links are buttons.
 * v1.8.1 (15 Nov 2026): in the metals view the family key (chips, their hit areas and the Colour key row)
 * is hidden, not just painted over, so no hidden chip can take keyboard focus.
 * © 2026 revisescience.org.uk | All rights reserved.
 * Our table reproduces the site's printable periodic table (N-PT.png) to scale: tile text sizes and
 * positions are measured from it (ABeeZee Bold, cap height 0.70 em). Exam layouts are black and white. */

.rspt {
  --rspt-ink: #25242f;
  --rspt-ink-body: #121643;
  --rspt-muted: #5f6475;
  --rspt-line: #e0e3e8;
  --rspt-soft: #f5f6fb;
  --rspt-info: #185abc;
  --rspt-label: #575656;
  --rspt-dark-text: #111;
  font-family: ABeeZee, Lexend, Calibri, sans-serif;
  color: var(--rspt-ink);
}

/* family colours: --a deep (top right), --b light (bottom left), --m solid fill, --t text */

.rspt-c-nonmetal {
  --a: #54468a;
  --b: #77a9b9;
  --m: #6277a5;
  --t: #fff;
}

.rspt-c-noble {
  --a: #e95197;
  --b: #f3a3c7;
  --m: #ee7aae;
  --t: var(--rspt-dark-text);
}

.rspt-c-alkali {
  --a: #f18743;
  --b: #fac17b;
  --m: #f6a45f;
  --t: var(--rspt-dark-text);
}

.rspt-c-alkaline {
  --a: #f8ad48;
  --b: #ffe585;
  --m: #fcc967;
  --t: var(--rspt-dark-text);
}

.rspt-c-metalloid {
  --a: #1d9dbf;
  --b: #75b63d;
  --m: #4ea987;
  --t: #fff;
}

.rspt-c-post {
  --a: #80a628;
  --b: #f6e602;
  --m: #b6bf13;
  --t: var(--rspt-dark-text);
}

.rspt-c-transition {
  --a: #cc2335;
  --b: #c77572;
  --m: #ca5252;
  --t: #fff;
}

.rspt-c-lanthanide {
  --a: #bb4469;
  --b: #cf98a8;
  --m: #c26d84;
  --t: #fff;
}

.rspt-c-actinide {
  --a: #b94424;
  --b: #cc9a2a;
  --m: #c26e25;
  --t: #fff;
}

.rspt-c-superheavy {
  --a: #8f8e8e;
  --b: #cccccc;
  --m: #aeaead;
  --t: var(--rspt-dark-text);
}

.rspt-c-key {
  --a: #828180;
  --b: #4b4a49;
  --m: #666564;
  --t: #fff;
}

/* ---------- toolbar (quiet concept-interactive register) ---------- */

.rspt-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin-bottom: 12px;
}

.rspt-bar-gap {
  flex: 1 1 auto;
}

.rspt-seg {
  display: inline-flex;
  border: 1px solid #c9ced8;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.rspt-seg button {
  font: inherit;
  font-size: 0.85rem;
  border: 0;
  background: none;
  padding: 6px 12px;
  color: var(--rspt-ink-body);
  cursor: pointer;
}

.rspt-seg button + button {
  border-left: 1px solid #c9ced8;
}

.rspt-seg button[aria-pressed="true"] {
  background: #e8f0fc;
  color: var(--rspt-info);
  font-weight: 700;
}

.rspt-seg-off button {
  cursor: default;
  color: var(--rspt-muted);
}

.rspt-seg-label {
  align-self: center;
  padding: 0 8px 0 10px;
  font-size: 0.78rem;
  color: var(--rspt-muted);
  border-right: 1px solid #c9ced8;
}

.rspt-btn {
  font: inherit;
  font-size: 0.85rem;
  border: 1px solid #c9ced8;
  color: var(--rspt-ink-body);
  background: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
}

.rspt-btn:hover {
  background: #f3f6fb;
}

.rspt-btn-strong {
  border-color: var(--rspt-info);
  color: var(--rspt-info);
}

.rspt-btn[aria-pressed="true"] {
  background: #e8f0fc;
  color: var(--rspt-info);
  font-weight: 700;
  border-color: var(--rspt-info);
}

.rspt button:focus-visible {
  outline: 3px solid var(--rspt-info);
  outline-offset: 2px;
}

.rspt-scroll {
  overflow-x: auto;
  padding: 4px 2px 6px;
}

.rspt-catrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 8px 0 4px;
}

.rspt-catrow[hidden] {
  display: none;
}

.rspt-catrow-label {
  margin-right: 2px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--rs-navy, #394362);
}

.rspt-catbtn {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid #d0d4e0;
  border-radius: 999px;
  background: #fff;
  color: var(--rs-ink, #25242f);
  font: inherit;
  font-size: 0.85rem;
  line-height: 1.2;
  cursor: pointer;
}

.rspt-catbtn:hover {
  background: #f5f6fb;
}

.rspt-catbtn:focus-visible {
  outline: 3px solid #5ba4cf;
  outline-offset: 2px;
}

.rspt-scroll-hint {
  display: none;
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--rspt-muted);
}

@media (max-width: 760px) {
  .rspt-scroll-hint {
    display: block;
  }
}

/* ---------- element tiles (all coloured layouts) ----------
   Each tile is its own container, so its text is sized from its own width. */

.rspt-el {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  display: block;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--m);
  color: var(--t);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .25s, filter .25s;
}

.rspt-el::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(225deg, var(--a), var(--b));
  opacity: 0;
  transition: opacity .3s ease;
}

.rspt-el:hover::before, .rspt-el:focus-visible::before, .rspt-el.rspt-selected::before, .rspt-el.rspt-right::before {
  opacity: 1;
}

.rspt-el > span {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  transform: translateY(-50%);
}

.rspt-el > span:nth-child(1) {
  top: 16.3%;
}

.rspt-el > span:nth-child(2) {
  top: 42%;
}

.rspt-el > span:nth-child(3) {
  top: 71.5%;
}

.rspt-el > span:nth-child(4) {
  top: 93.2%;
}

.rspt-el .rspt-ar {
  font-size: 22.3cqi;
}

.rspt-el .rspt-z {
  font-size: 21cqi;
}

.rspt-el .rspt-sym {
  font-size: 32.5cqi;
}

.rspt-el .rspt-name {
  font-size: 15.8cqi;
}

.rspt-el.rspt-longname .rspt-name {
  font-size: 13.6cqi;
  letter-spacing: -0.02em;
}

@container (max-width: 46px) {
  .rspt-el .rspt-name {
    display: none;
  }
}

.rspt-el.rspt-dim {
  opacity: 0.16;
  filter: grayscale(0.85);
}

.rspt-el.rspt-selected {
  outline: 3px solid var(--rspt-ink);
  outline-offset: 1px;
  z-index: 2;
}

.rspt-el.rspt-right {
  outline: 3px solid #1f8a3a;
  outline-offset: 1px;
  z-index: 2;
}

.rspt-el.rspt-wrong {
  animation: rspt-shake .35s;
  outline: 3px solid var(--rs-wrong,#b52b27);
  outline-offset: 1px;
}

@keyframes rspt-shake {
  25% {
    translate: -3px 0;
  }
  75% {
    translate: 3px 0;
  }
}

/* metals and non-metals colouring */

/* v1.7: warm orange metals, sky-blue non-metals (dark text on both), metalloids split half and half,
   superheavy elements pale grey with a dashed edge (properties not known) */

.rspt-view-metals .rspt-el {
  --a: #e07b2a;
  --b: #f8be86;
  --m: #f29a4a;
  --t: #25242f;
}

.rspt-view-metals .rspt-el.rspt-c-nonmetal, .rspt-view-metals .rspt-el.rspt-c-noble {
  --a: #3c8ad8;
  --b: #a3cdf5;
  --m: #62a8ec;
  --t: #25242f;
}

.rspt-view-metals .rspt-el.rspt-c-metalloid {
  --a: #62a8ec;
  --b: #f29a4a;
  --m: #f29a4a;
  --t: #25242f;
  background: linear-gradient(135deg, #f29a4a 50%, #62a8ec 50%);
}

.rspt-view-metals .rspt-el.rspt-c-superheavy {
  --a: #d5d8de;
  --b: #f1f2f5;
  --m: #eceef2;
  --t: #5b6070;
  outline: 1.5px dashed #9aa0ab;
  outline-offset: -1.5px;
}

.rspt-mlegend {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 2.4em;
  color: var(--rspt-ink);
  font-weight: 700;
}

.rspt-view-metals .rspt-chip, .rspt-view-metals .rspt-legend {
  display: none;
}

.rspt-view-metals .rspt-mlegend {
  display: flex;
}

.rspt-mlegend i {
  display: inline-block;
  width: 1.3em;
  height: 1.3em;
  vertical-align: -0.25em;
  margin-right: 0.45em;
}

.rspt-m-metal {
  background: #f29a4a;
}

.rspt-m-non {
  background: #62a8ec;
}

.rspt-m-mid {
  background: linear-gradient(135deg, #f29a4a 50%, #62a8ec 50%);
}

.rspt-m-unk {
  background: #eceef2;
  outline: 1.5px dashed #9aa0ab;
  outline-offset: -1.5px;
}

/* ---------- key (the enlarged tile) ---------- */

.rspt-key {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  aspect-ratio: 1;
  background: var(--m);
  color: var(--t);
  font-weight: 700;
}

.rspt-key::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(225deg, var(--a), var(--b));
}

.rspt-key > span {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  transform: translateY(-50%);
}

.rspt-key-ar {
  top: 19%;
  font-size: 9.6cqi;
}

.rspt-key-sym {
  top: 40.2%;
  font-size: 27cqi;
}

.rspt-key-z {
  top: 63.9%;
  font-size: 8.3cqi;
}

.rspt-key-name {
  top: 84.2%;
  font-size: 13.7cqi;
}

.rspt-key-on .rspt-key-ar {
  top: 17.4%;
  font-size: 16.3cqi;
}

.rspt-key-on .rspt-key-sym {
  top: 42%;
  font-size: 23.8cqi;
}

.rspt-key-on .rspt-key-z {
  top: 71.5%;
  font-size: 15.4cqi;
}

.rspt-key-on .rspt-key-name {
  top: 93.2%;
  font-size: 11.6cqi;
}

/* legend chips */

.rspt-chip {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font: inherit;
  font-weight: 700;
  color: var(--t);
  line-height: 1.2;
  border: 0;
  border-radius: 0;
  padding: 0 4%;
  cursor: pointer;
  background: var(--m);
}

.rspt-canvas .rspt-chip {
  font-size: calc(var(--u) * 42);
  padding: 0;
}

.rspt-chip > span {
  white-space: nowrap;
}

.rspt-grid .rspt-chip {
  font-size: max(8px, calc(100cqi / 32.6 * 0.18));
}

.rspt-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(225deg, var(--a), var(--b));
}

.rspt-chip:hover {
  filter: brightness(1.06);
}

.rspt-chip.rspt-chip-on {
  outline: 3px solid var(--rspt-ink);
  outline-offset: 1px;
  z-index: 1;
}

/* ---------- our table: drawn to scale ---------- */

.rspt-canvaswrap {
  container-type: inline-size;
  min-width: 760px;
}

.rspt-canvas {
  --u: calc(100cqi / 4768);
  position: relative;
  width: 100%;
  height: calc(var(--u) * 2546);
}

.rspt-canvas > * {
  position: absolute;
}

.rspt-dlabel {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rspt-label);
  font-weight: 700;
  font-size: calc(var(--u) * 115.7);
  line-height: 1;
  padding-top: calc(var(--u) * 12);
}

.rspt-dpg {
  color: var(--rspt-label);
  font-weight: 700;
  font-size: calc(var(--u) * 59);
  line-height: 1;
}

.rspt-dpg span {
  position: absolute;
}

.rspt-dpg span:first-child {
  right: 0;
  top: 0;
}

.rspt-dpg span:last-child {
  left: 0;
  bottom: 0;
}

.rspt-dpg::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 50%;
  border-top: calc(var(--u) * 7) solid var(--rspt-label);
  transform: rotate(45deg);
}

.rspt-ddots {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 8);
}

.rspt-ddots i {
  display: block;
  width: calc(var(--u) * 25);
  height: calc(var(--u) * 25);
  border-radius: 50%;
  background: #000;
}

.rspt-canvas .rspt-mlegend {
  font-size: calc(var(--u) * 46);
}

/* ---------- 32-column and left-step layouts (grids of the same tiles) ---------- */

.rspt-grid {
  display: grid;
  gap: max(2px, 0.4cqi);
  container-type: inline-size;
}

.rspt-scroll > .rspt-grid {
  min-width: 1100px;
}

.rspt-wide, .rspt-janet {
  grid-template-columns: minmax(0, 0.6fr) repeat(32, minmax(0, 1fr));
}

.rspt-glabel, .rspt-plabel {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rspt-label);
  font-weight: 700;
  font-size: clamp(0.75rem, 1.4cqi, 2.2rem);
  line-height: 1;
}

.rspt-glabel {
  padding-bottom: 0.4cqi;
}

.rspt-plabel {
  grid-column: 1;
}

.rspt-blabel {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-weight: 700;
  color: var(--rspt-label);
  font-size: max(11px, 0.9cqi);
  padding-bottom: 0.3cqi;
  border-bottom: 2px solid #c9ced8;
  margin: 0 0.2cqi 0.3cqi;
}

.rspt-keybox, .rspt-legendbox {
  contain: size;
  overflow: visible;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.rspt-legendbox {
  justify-content: flex-end;
}

.rspt-grid .rspt-key {
  width: calc(100cqi / 32.6 * 1.36);
}

.rspt-legend {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  width: 100%;
}

.rspt-grid .rspt-chip {
  min-height: calc(100cqi / 32.6 * 0.49);
}

.rspt-grid .rspt-mlegend {
  font-size: max(12px, 1.1cqi);
}

/* ---------- exam board layouts: black and white, as printed ---------- */

.rspt-sheet {
  background: #fff;
  color: #000;
  padding: 1.2em 1em 1em;
  border: 1px solid var(--rspt-line);
  min-width: 760px;
  container-type: inline-size;
}

.rspt-sheet-title {
  font-weight: 700;
  font-size: max(14px, 2cqi);
  margin: 0 0 1cqi;
}

.rspt-sheet-ocr {
  font-family: "Times New Roman", Times, serif;
}

.rspt-sheet-ocr .rspt-sheet-title {
  text-align: center;
}

.rspt-sheet-aqa, .rspt-sheet-edex {
  font-family: Arial, Helvetica, sans-serif;
}

.rspt-sgrid {
  display: grid;
  grid-template-columns: repeat(18, minmax(0, 1fr));
  gap: 0;
}

.rspt-slabel {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-size: max(8px, 0.85cqi);
  font-weight: 700;
  padding: 0.3cqi 0;
}

.rspt-slabel-top {
  font-size: max(10px, 1.15cqi);
  padding: 0.6cqi 0 0.8cqi;
}

.rspt-sheet-ocr .rspt-slabel-top {
  font-weight: 400;
}

.rspt-s {
  position: relative;
  min-width: 0;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #000;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: inset 0 0 0 0.5px #000, 0 0 0 0.5px #000;
  font: inherit;
  font-weight: 400;
  line-height: 1.15;
  cursor: pointer;
}

.rspt-sheet-aqa .rspt-s, .rspt-sheet-edex .rspt-s {
  aspect-ratio: 0.83;
}

.rspt-sheet-ocr .rspt-s {
  aspect-ratio: 1.03;
}

.rspt-s:hover {
  background: #eef3fb;
}

.rspt-s > span {
  white-space: nowrap;
  position: static;
  transform: none;
  line-height: 1.15;
}

.rspt-s::before {
  display: none;
}

.rspt-s .rspt-ar, .rspt-s .rspt-z {
  font-size: 19cqi;
}

.rspt-s .rspt-sym {
  font-size: 24cqi;
  font-weight: 700;
}

.rspt-s .rspt-name {
  font-size: 11.5cqi;
  margin: 0.08em 0;
}

.rspt-sheet-ocr .rspt-s .rspt-ar, .rspt-sheet-ocr .rspt-s .rspt-z {
  font-size: 17cqi;
}

.rspt-sheet-ocr .rspt-s .rspt-name {
  font-size: 10cqi;
}

.rspt-s.rspt-longname .rspt-name {
  font-size: 9.5cqi;
}

@container (max-width: 40px) {
  .rspt-s .rspt-name {
    display: none;
  }
}

.rspt-s.rspt-selected {
  background: #dce8fb;
  outline: 3px solid var(--rspt-info);
  outline-offset: 0;
  z-index: 2;
}

.rspt-s.rspt-right {
  background: #dff1e3;
  outline: 3px solid #1f8a3a;
  z-index: 2;
}

.rspt-s.rspt-wrong {
  background: var(--rs-wrong-fill,#f8d7d6);
  outline: 3px solid var(--rs-wrong,#b52b27);
  animation: rspt-shake .35s;
  z-index: 2;
}

.rspt-s.rspt-dim {
  color: #b9b9b9;
}

.rspt-s-range {
  cursor: default;
  text-align: center;
}

.rspt-s-range:hover {
  background: #fff;
}

.rspt-s-range span {
  font-size: 15cqi;
}

.rspt-s-range .rspt-sname {
  font-size: 11cqi;
}

.rspt-s-range::before {
  content: "";
  display: block;
  position: absolute;
  left: -3px;
  top: 0;
  bottom: 0;
  width: 5px;
  background: #a6a6a6;
}

.rspt-s-range::after {
  content: "";
  position: absolute;
  left: -5px;
  top: calc(50% - 4.5px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #000;
}

.rspt-omit-bar {
  border-left: 0.35cqi solid #000;
}

.rspt-skey {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 0.6cqi;
}

.rspt-skey-ocr {
  justify-content: center;
}

.rspt-skey-h {
  font-weight: 700;
  font-size: max(9px, 1.05cqi);
  margin-bottom: 0.2cqi;
}

.rspt-skey-box {
  width: 100%;
  border: 1px solid #000;
  padding: 0.3cqi 0.6cqi;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
  text-align: center;
}

.rspt-sheet-aqa .rspt-skey-box, .rspt-sheet-edex .rspt-skey-box {
  height: calc(100cqi / 18 / 0.83);
}

.rspt-skey-n {
  font-size: max(8px, 1.05cqi);
}

.rspt-skey-b {
  font-size: max(9px, 1.15cqi);
  font-weight: 700;
}

.rspt-skey-s {
  font-size: max(6px, 0.65cqi);
}

.rspt-snote-inline {
  display: flex;
  align-items: center;
  padding-left: 1cqi;
  font-size: max(8px, 0.85cqi);
}

.rspt-sheet-notes {
  margin-top: 1cqi;
  font-size: max(10px, 1.05cqi);
}

.rspt-sheet-notes p {
  margin: 0 0 0.4cqi;
}

.rspt-nocourse {
  border: 1px dashed #c9ced8;
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  color: var(--rspt-ink-body);
  max-width: 640px;
}

.rspt-nocourse p {
  margin: 0 0 6px;
}

/* ---------- explanation panel ---------- */

.rspt-panel {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--rspt-soft);
  border: 1px solid var(--rspt-line);
  border-radius: 8px;
  min-height: 64px;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--rspt-ink-body);
}

.rspt-panel p {
  margin: 0 0 8px;
}

.rspt-panel p:last-child {
  margin-bottom: 0;
}

.rspt-panel-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rspt-hint {
  color: var(--rspt-muted);
}

.rspt-detail {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.rspt-shell-well {
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid var(--rspt-line);
  border-radius: 6px;
  padding: 8px;
  text-align: center;
}

.rspt-shells {
  width: 130px;
  height: 130px;
  display: block;
}

.rspt-shell-well .rs-atom-svg {
  width: 240px;
  height: 240px;
  display: block;
}

.rspt-atom-key {
  display: flex;
  gap: 10px;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--rspt-ink);
  margin-top: 4px;
}

.rspt-atom-key i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: -1px;
}

.rspt-k-p {
  background: #d33c16;
}

.rspt-k-n {
  background: #5ba4cf;
}

.rspt-k-e {
  background: #25242f;
}

.rspt-keynums {
  border-collapse: collapse;
  margin: 0 0 10px;
  font-size: 0.95rem;
  background: #fff;
  border: 1px solid var(--rspt-line);
}

.rspt-keynums th {
  text-align: left;
  font-weight: 400;
  padding: 4px 12px;
  color: var(--rspt-ink);
  border-top: 1px solid var(--rspt-line);
}

.rspt-keynums td {
  font-weight: 700;
  padding: 4px 12px;
  border-top: 1px solid var(--rspt-line);
  color: var(--rspt-ink-body);
}

.rspt-shell {
  fill: none;
  stroke: #6d7487;
  stroke-width: 1.5;
}

.rspt-electron {
  fill: var(--rspt-info);
}

.rspt-nucleus {
  fill: #d33e16;
}

.rspt-nucleus-text {
  fill: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: ABeeZee, Lexend, sans-serif;
}

.rspt-facts {
  flex: 1 1 auto;
}

.rspt-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: linear-gradient(225deg, var(--a), var(--b));
  vertical-align: -2px;
  margin-right: 6px;
  flex: 0 0 auto;
}

.rspt-family {
  color: var(--rspt-ink);
}

.rspt-big {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.rspt-feedback:empty {
  display: none;
}

.rspt-about {
  display: grid;
  gap: 6px;
  margin: 4px 0 10px;
}

.rspt-about details {
  background: #fff;
  border: 1px solid var(--rspt-line);
  border-radius: 6px;
  padding: 8px 12px;
}

.rspt-about summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--rspt-ink-body);
}

.rspt-about details p {
  margin: 8px 0 2px;
  color: var(--rspt-ink);
}

@media (max-width: 560px) {
  .rspt-detail {
    flex-direction: column;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rspt-el, .rspt-el::before {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rspt-el.rspt-wrong, .rspt-s.rspt-wrong {
    animation: none;
  }
}

/* ---------- our table: Matthew's artwork with interactive layers ---------- */

.rspt-artwrap {
  min-width: 760px;
}

.rspt-art-svg {
  display: block;
  width: 100%;
  height: auto;
}

.rspt-solid {
  fill: var(--m);
  transition: opacity .3s ease;
  pointer-events: none;
}

.rspt-solid-off {
  opacity: 0;
}

.rspt-view-metals .rspt-solid {
  opacity: 1 !important;
  fill: #f29a4a;
}

.rspt-view-metals .rspt-solid.rspt-c-nonmetal, .rspt-view-metals .rspt-solid.rspt-c-noble {
  fill: #62a8ec;
}

.rspt-view-metals .rspt-solid.rspt-c-metalloid {
  fill: url(#rsptMidSplit);
}

.rspt-view-metals .rspt-solid.rspt-c-superheavy {
  fill: #eceef2;
  stroke: #9aa0ab;
  stroke-width: 1.5px;
  stroke-dasharray: 5 3;
  vector-effect: non-scaling-stroke;
}

.rspt-hit {
  fill: transparent;
  cursor: pointer;
}

.rspt-hitg {
  outline: none;
}

.rspt-dimmer {
  fill: #fff;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}

.rspt-hitg.rspt-dim .rspt-dimmer {
  opacity: .8;
}

.rspt-outline {
  fill: none;
  stroke: none;
  pointer-events: none;
}

.rspt-hitg.rspt-selected .rspt-outline {
  stroke: var(--rspt-ink);
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
}

.rspt-hitg.rspt-right .rspt-outline {
  stroke: #1f8a3a;
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
}

.rspt-hitg.rspt-wrong .rspt-outline {
  stroke: var(--rs-wrong,#b52b27);
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
}

.rspt-hitg:focus-visible .rspt-outline {
  stroke: var(--rspt-info);
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
}

.rspt-chiphit {
  fill: transparent;
  cursor: pointer;
  outline: none;
}

.rspt-chiphit.rspt-chip-on, .rspt-chiphit:focus-visible {
  stroke: var(--rspt-ink);
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
}

.rspt-mlegend-ovl {
  display: none;
}

.rspt-view-metals .rspt-mlegend-ovl {
  display: inline;
}

.rspt-mlegend-ovl .rspt-m-metal {
  fill: #f29a4a;
}

.rspt-mlegend-ovl .rspt-m-non {
  fill: #62a8ec;
}

.rspt-mlegend-ovl .rspt-m-mid {
  fill: url(#rsptMidSplit);
}

.rspt-mlegend-ovl .rspt-m-unk {
  fill: #eceef2;
  stroke: #9aa0ab;
  stroke-width: 1.5px;
  stroke-dasharray: 5 3;
}

.rspt-mlegend-ovl .rspt-svgtext {
  font-size: 25px;
}

.rspt-svgtext {
  font-family: ABeeZee, Lexend, sans-serif;
  font-weight: 700;
  fill: var(--rspt-ink);
}

.rspt-keyovl {
  display: none;
  pointer-events: none;
}

.rspt-keyovl.rspt-keyovl-on {
  display: inline;
}

.rspt-keyovl rect {
  fill: var(--m);
}

.rspt-keyovl .rspt-svgtext {
  fill: var(--t);
}

/* generated labels and the exam board layout (black and white) */

.rspt-svglabel {
  fill: var(--rspt-label);
}

.rspt-svgrule {
  stroke: #c9ced8;
  stroke-width: 2;
}

.rspt-exam-svg .rspt-svglabel {
  fill: #000;
}

.rspt-xbox {
  fill: #fff;
  stroke: #000;
  stroke-width: 1.2;
}

.rspt-xtext {
  fill: #000;
  font-weight: 400;
}

.rspt-xsym {
  font-weight: 700;
}

.rspt-xbar {
  fill: #000;
}

.rspt-exam-svg .rspt-hitg.rspt-selected .rspt-dimmer, .rspt-exam-svg .rspt-hitg.rspt-hover .rspt-dimmer {
  fill: #185abc;
  opacity: .12;
}

.rspt-exam-svg .rspt-svgtext {
  font-family: ABeeZee, Lexend, sans-serif;
}

.rspt-artwrap .rspt-sheet-title {
  font-family: inherit;
  text-align: left;
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0 0 6px;
  color: #000;
}

.rspt-artwrap .rspt-sheet-notes {
  font-size: 0.92rem;
  color: #000;
  margin-top: 6px;
}

.rspt-artwrap .rspt-sheet-notes p {
  margin: 0 0 4px;
}

/* metals and non-metals: dark text on the light fills; grey text on the superheavy elements */

.rspt-view-metals .rspt-tile g[fill] {
  fill: #25242f;
}

.rspt-view-metals .rspt-tile.rspt-f-superheavy g[fill] {
  fill: #5b6070;
}

/* property views: state at a temperature, melting point, boiling point, density */

.rspt-bar2 {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.rspt-temp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--rspt-ink-body);
}

.rspt-temp input[type="range"] {
  width: min(360px, 50vw);
  accent-color: var(--rspt-info);
}

.rspt-temp output {
  min-width: 14em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rspt-view-prop .rspt-solid {
  opacity: 1 !important;
  transition: fill .25s ease;
}

.rspt-view-prop .rspt-tile.rspt-tlight g[fill] {
  fill: #fff;
}

.rspt-view-prop .rspt-tile.rspt-tdark g[fill] {
  fill: #111;
}

.rspt-view-prop .rspt-mlegend-ovl {
  display: none;
}

.rspt-legtitle {
  font-weight: 700;
}

.rspt-proplegend .rspt-svgtext:not(.rspt-legtitle) {
  font-weight: 400;
  fill: #3a3a40;
}

.rspt-config {
  font-size: 0.95rem;
  font-weight: 400;
  margin-top: 6px;
  color: var(--rspt-ink);
}

.rspt-config b {
  font-size: 1.1rem;
}

.rspt-legsub {
  fill: var(--rspt-ink-muted, #6b6a66);
}

.rspt-bar2 .rspt-btn[aria-pressed="true"] {
  background: var(--rspt-info-soft, #e6f0fb);
  border-color: var(--rspt-info, #2a78d6);
}

/* Element panel: linked cards + property row (v0.9) */

.rspt-facts {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rspt-cards {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  gap: 10px;
}

.rspt-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--rspt-line);
  border-radius: 6px;
  padding: 10px 12px;
}

.rspt-big {
  flex: 0 0 auto;
  min-width: 1.6em;
  text-align: center;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  color: var(--rspt-info);
  font-variant-numeric: tabular-nums;
}

.rspt-card-body {
  min-width: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.rspt-chain, .rspt-sublink {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.rspt-sublink + .rspt-sublink {
  margin-top: 4px;
}

.rspt-pill {
  background: #e8f0fc;
  color: var(--rspt-ink-body);
  border-radius: 999px;
  padding: 1px 9px;
  white-space: nowrap;
}

.rspt-eq {
  font-weight: 700;
  color: var(--rspt-info);
  padding: 0 1px;
}

.rspt-cardlabel {
  color: var(--rspt-muted);
  font-size: 0.82rem;
  margin-bottom: 3px;
}

.rspt-why {
  margin: 5px 0 0;
  font-size: 0.8rem;
  color: var(--rspt-muted);
  line-height: 1.35;
}

.rspt-props {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #fff;
  border: 1px solid var(--rspt-line);
  border-radius: 6px;
}

.rspt-prop {
  padding: 8px 12px;
  border-left: 1px solid var(--rspt-line);
  min-width: 0;
}

.rspt-prop:first-child {
  border-left: 0;
}

.rspt-prop-wide {
  grid-column: span 2;
}

.rspt-prop-l {
  font-size: 0.78rem;
  color: var(--rspt-muted);
}

.rspt-prop-v {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--rspt-ink-body);
  display: flex;
  align-items: center;
  gap: 6px;
}

.rspt-prop-s {
  font-size: 0.78rem;
  color: var(--rspt-muted);
  font-variant-numeric: tabular-nums;
}

.rspt-sdot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.rspt-facts .rspt-family {
  margin: 0;
}

@media (max-width: 640px) {
  .rspt-props {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .rspt-prop:nth-child(3) {
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .rspt-prop {
    border-top: 1px solid var(--rspt-line);
  }
}

@media (max-width: 640px) {
  .rspt-detail {
    flex-wrap: wrap;
  }
}

/* v0.10: bigger arrangement, isotopes, formulas */

.rspt-card-wide {
  grid-column: 1 / -1;
}

.rspt-arr {
  font-size: 2.3rem;
  letter-spacing: 0.02em;
}

.rspt-card-e .rspt-big {
  white-space: nowrap;
}

.rspt-card-iso, .rspt-card-form {
  display: block;
}

.rspt-cardhead {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--rspt-ink-body);
}

.rspt-why-top {
  margin-top: 2px;
}

.rspt-isobar {
  display: flex;
  gap: 2px;
  height: 14px;
  margin: 8px 0 6px;
}

.rspt-isobar span {
  min-width: 2px;
  background: #a9c4ea;
  border-radius: 2px;
}

.rspt-isobar span.rspt-iso-main {
  background: var(--rspt-info);
}

.rspt-isos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.85rem;
}

.rspt-iso {
  background: var(--rspt-soft);
  border: 1px solid var(--rspt-line);
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
}

.rspt-iso.rspt-iso-main {
  border-color: var(--rspt-info);
  background: #e8f0fc;
}

.rspt-iso-pct {
  font-weight: 700;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

.rspt-iso-tag {
  margin-left: 6px;
  font-size: 0.75rem;
  color: var(--rspt-info);
  font-weight: 700;
}

.rspt-armean {
  margin: 8px 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
}

.rspt-beyond {
  margin-top: 6px;
  font-size: 0.82rem;
}

.rspt-beyond summary {
  cursor: pointer;
  color: var(--rspt-info);
  font-weight: 700;
}

.rspt-beyond p {
  margin: 4px 0 0;
  color: var(--rspt-ink-body);
  line-height: 1.45;
}

.rspt-fgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.rspt-fcell {
  border: 1px solid var(--rspt-line);
  border-radius: 6px;
  padding: 6px 10px;
}

.rspt-fcell-on {
  border-color: var(--rspt-info);
  background: #e8f0fc;
}

.rspt-fcell-none {
  color: var(--rspt-muted);
  background: var(--rspt-soft);
}

.rspt-formula {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rspt-ink-body);
  line-height: 1.2;
}

.rspt-ss {
  font-size: 0.9rem;
  font-weight: 400;
  margin-left: 1px;
}

.rspt-fkind, .rspt-fnone {
  font-size: 0.78rem;
  color: var(--rspt-muted);
  line-height: 1.35;
}

.rspt-fnow {
  color: var(--rspt-info);
  font-weight: 700;
}

.rspt-atom-note {
  font-size: 0.8rem;
  color: var(--rspt-muted);
  margin-top: 2px;
}

@media (max-width: 640px) {
  .rspt-fgrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .rspt-shell-well .rs-atom-svg {
    width: 200px;
    height: 200px;
    margin: 0 auto;
  }
}

.rspt-subtext {
  margin-top: 4px;
}

@media (max-width: 760px) {
  .rspt-cards {
    grid-template-columns: 1fr;
  }
}

/* v0.11: one grid for the element panel */

.rspt-detail {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.rspt-detail > .rspt-shell-well {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.rspt-detail > .rspt-card-wide, .rspt-detail > .rspt-props, .rspt-detail > .rspt-family {
  grid-column: 1 / -1;
}

.rspt-detail > .rspt-family {
  margin: 0;
}

.rspt-card-ar {
  display: block;
}

.rspt-why-dark {
  color: var(--rspt-ink-body);
  font-size: 0.85rem;
}

.rspt-math {
  font-size: 1.1rem;
  margin: 8px 0 4px;
  color: var(--rspt-ink-body);
}

.rspt-atom-note {
  max-width: 220px;
  margin: 4px auto 0;
}

@media (max-width: 760px) {
  .rspt-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .rspt-detail > .rspt-shell-well {
    grid-row: auto;
  }
}

/* phase diagram */

.rspt-card-phase {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr);
  gap: 16px;
  align-items: start;
}

.rspt-phase-svg {
  width: 100%;
  height: auto;
  display: block;
  touch-action: none;
  cursor: crosshair;
  font-family: inherit;
}

.rspt-ph-tick {
  font-size: 11px;
  fill: #52514e;
}

.rspt-ph-axis {
  font-size: 12px;
  fill: #25242f;
  font-weight: 700;
}

.rspt-ph-region {
  font-size: 15px;
  font-weight: 700;
}

.rspt-ph-pt {
  font-size: 11px;
  fill: #25242f;
  font-weight: 700;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3px;
}

.rspt-ph-note {
  font-size: 10px;
  fill: #6b6e78;
}

.rspt-ph-read {
  margin: 8px 0;
  font-size: 0.95rem;
  color: var(--rspt-ink-body);
  background: #e8f0fc;
  border-radius: 6px;
  padding: 8px 10px;
}

.rspt-ph-press {
  margin: 4px 0 8px;
}

.rspt-ph-press input[type="range"] {
  width: 100%;
}

@media (max-width: 760px) {
  .rspt-card-phase {
    grid-template-columns: 1fr;
  }
}

/* ---------- v0.13: controls, tabs, full screen, new layouts ---------- */

.rspt-bar {
  align-items: center;
}

.rspt-menuwrap {
  position: relative;
}

.rspt-menubtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: var(--rspt-info);
}

.rspt-menubtn-l {
  font-size: 0.78rem;
  color: var(--rspt-muted);
}

.rspt-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  width: 340px;
  background: #fff;
  border: 1px solid #c9ced8;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(18, 22, 67, .16);
  padding: 6px;
}

.rspt-menu-h {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--rspt-muted);
  padding: 8px 10px 4px;
}

.rspt-menu button {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  border: 0;
  background: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--rspt-ink-body);
}

.rspt-menu button b {
  display: block;
  font-size: 0.9rem;
}

.rspt-menu button span {
  display: block;
  font-size: 0.78rem;
  color: var(--rspt-muted);
}

.rspt-menu button:hover, .rspt-menu button:focus-visible {
  background: var(--rspt-soft);
}

.rspt-menu button[aria-checked="true"] {
  background: #e8f0fc;
}

.rspt-menu button[aria-checked="true"] b {
  color: var(--rspt-info);
}

/* every layout fits the screen height */

.rspt-artwrap > svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 82vh;
}

.rspt-artwrap-benfey, .rspt-artwrap-circle {
  min-width: 600px;
}

/* wedge cells (spiral and circular) */

.rspt-cell {
  stroke: #fff;
  stroke-width: 1.6;
}

.rspt-celltext {
  font-family: 'ABeeZee', system-ui, sans-serif;
  font-weight: 700;
  text-anchor: middle;
  pointer-events: none;
}

.rspt-celltile.rspt-f-superheavy g[fill] {
  fill: #25242f;
}

.rspt-hitg.rspt-hover .rspt-outline {
  stroke: var(--rspt-ink);
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
}

.rspt-svgsmall {
  font-weight: 400;
}

.rspt-klink {
  stroke: #9aa0ad;
  stroke-width: 2;
}

.rspt-kproto {
  fill: #fff;
  stroke: #575656;
  stroke-width: 3;
}

.rspt-kbracket {
  fill: none;
  stroke: #575656;
  stroke-width: 3;
}

/* element panel: header + tabs */

.rspt-panelhead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}

.rspt-panelhead .rspt-panel-title {
  margin-bottom: 0;
}

.rspt-panelhead .rspt-family {
  margin: 0;
  font-size: 0.9rem;
}

.rspt-titlez {
  font-weight: 400;
  color: var(--rspt-muted);
  font-size: 0.9em;
}

.rspt-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid #c9ced8;
  margin: 8px 0 10px;
}

.rspt-tabs button {
  font: inherit;
  font-size: 0.9rem;
  border: 0;
  background: none;
  padding: 7px 14px;
  cursor: pointer;
  color: var(--rspt-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}

.rspt-tabs button[aria-selected="true"] {
  color: var(--rspt-info);
  font-weight: 700;
  border-bottom-color: var(--rspt-info);
}

.rspt-tabpane[hidden] {
  display: none !important;
}

.rspt-pane-atom {
  grid-template-columns: 250px minmax(0, 1fr);
}

.rspt-pane-atom > .rspt-shell-well {
  grid-row: span 2;
}

.rspt-pane-mass {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.rspt-pane-states {
  grid-template-columns: 1fr;
}

.rspt-pane-states > .rspt-props {
  order: -1;
}

/* full screen: table on the left, details on the right */

.rspt.rspt-full {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0 14px;
  padding: 12px 14px;
  overflow: hidden;
}

.rspt-full > .rspt-bar {
  grid-column: 1 / -1;
}

.rspt-full > .rspt-scroll {
  grid-column: 1;
  grid-row: 2;
  overflow: auto;
  display: flex;
  align-items: center;
}

.rspt-full > .rspt-scroll > .rspt-artwrap {
  width: 100%;
}

.rspt-full .rspt-artwrap > svg {
  max-height: calc(100vh - 150px);
}

.rspt-full > .rspt-scroll-hint {
  display: none;
}

.rspt-full > .rspt-panel {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  overflow: auto;
  min-height: 0;
}

.rspt-full .rspt-detail {
  grid-template-columns: 1fr !important;
}

.rspt-full .rspt-pane-atom > .rspt-shell-well {
  grid-row: auto;
}

.rspt-full .rspt-card-phase {
  grid-template-columns: 1fr;
}

.rspt-full .rspt-props {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 760px) {
  .rspt-pane-atom, .rspt-pane-mass {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .rspt-pane-atom > .rspt-shell-well {
    grid-row: auto;
  }
}

.rspt-klink-dash {
  stroke-dasharray: 16 10;
  stroke: #6b6e78;
  stroke-width: 3;
}

/* accordion sections (v0.14) */

.rspt-sec {
  margin-top: 10px;
}

.rspt-sec > summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--rspt-ink-body);
  padding: 6px 2px;
  border-bottom: 1px solid #c9ced8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rspt-sec > summary::-webkit-details-marker {
  display: none;
}

.rspt-sec > summary::before {
  content: '▸';
  color: var(--rspt-info);
  transition: transform .15s;
  display: inline-block;
}

.rspt-sec[open] > summary::before {
  transform: rotate(90deg);
}

.rspt-sec > .rspt-detail {
  margin-top: 10px;
}

/* pop-up card over the table (v0.15) */

.rspt {
  position: relative;
}

.rspt-pop {
  position: absolute;
  right: 12px;
  z-index: 40;
  width: min(460px, calc(100% - 24px));
  max-height: min(70vh, 640px);
  overflow: auto;
  background: #fff;
  border: 1px solid #c9ced8;
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(18, 22, 67, .22);
  padding: 16px 18px 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--rspt-ink-body);
}

.rspt-pop .rspt-panel-title {
  padding-right: 32px;
}

.rspt-pop-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #c9ced8;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--rspt-ink-body);
}

.rspt-pop-x:hover {
  background: var(--rspt-soft);
}

/* full screen: bigger controls (v0.16) */

.rspt-full .rspt-bar {
  gap: 10px 14px;
  padding-bottom: 6px;
}

.rspt-full .rspt-seg button, .rspt-full .rspt-btn {
  font-size: 1.02rem;
  padding: 10px 18px;
}

.rspt-full .rspt-seg-label, .rspt-full .rspt-menubtn-l {
  font-size: 0.85rem;
}

.rspt-full .rspt-temp {
  font-size: 1rem;
}

.rspt-full .rspt-temp input[type="range"] {
  width: min(460px, 34vw);
}

.rspt-loadfail {
  padding: 24px;
  border: 1px dashed #c9ced8;
  border-radius: 8px;
  color: var(--rspt-muted);
  text-align: center;
}

.rspt-bar {
  -webkit-user-select: none;
  user-select: none;
}

.rspt-temp input[type="range"] {
  touch-action: none;
  cursor: pointer;
}

/* video window (v1.2) */

.rspt-pop.rspt-pop-video {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: min(1000px, calc(100% - 24px), calc((100vh - 140px) * 16 / 9));
  max-height: none;
  z-index: 45;
}

.rspt-pop-back {
  position: absolute;
  inset: 0;
  z-index: 44;
  background: rgba(18, 22, 67, 0.45);
  border-radius: inherit;
}

.rspt-video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.rspt-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.rspt-btn-video {
  border-color: var(--rspt-info);
  color: var(--rspt-info);
}

/* toolbar rows (v1.3) */

.rspt-bar {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
}

.rspt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.rspt-row1 .rspt-bar-gap {
  flex: 1 1 auto;
}

.rspt-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.rspt-seg-colour {
  flex-wrap: wrap;
}

.rspt-seg button.rspt-seg-split {
  border-left: 2px solid #c9ced8;
}

.rspt-bar2 {
  flex: none;
  padding-top: 2px;
}

.rspt-bar2 .rspt-temp {
  flex: 1 1 260px;
  min-width: 0;
}

.rspt-bar2 .rspt-temp input[type="range"] {
  flex: 1 1 auto;
  width: auto;
  min-width: 120px;
}

.rspt-bar2 .rspt-temp output {
  min-width: 0;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .rspt-tools {
    justify-content: flex-start;
  }
}

/* ---------- Build a compound (v1.4) ---------- */

.rspt-build .rspt-panelhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.rspt-tray {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 10px;
  margin: 6px 0 12px;
  background: #fff;
  border: 2px dashed #b8c0ce;
  border-radius: 10px;
  transition: border-color .15s, background .15s;
}

.rspt-tray-over {
  border-color: var(--rspt-info);
  background: #eef4fd;
}

.rspt-tray-empty {
  color: var(--rspt-muted);
  font-size: 0.92rem;
}

.rspt-tray-clear {
  margin-left: auto;
  font-size: 0.88rem;
}

.rspt-tchip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-size: 0.9rem;
  padding: 4px 10px 4px 4px;
  border: 1px solid #c9ced8;
  border-radius: 8px;
  background: #fff;
  color: var(--rspt-ink-body);
  cursor: pointer;
  white-space: nowrap;
}

.rspt-tchip b {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 3px;
  border-radius: 5px;
  background: linear-gradient(225deg, var(--a), var(--b));
  color: var(--t);
  font-size: 0.95rem;
}

.rspt-tchip:hover {
  background: #f3f6fb;
}

.rspt-tchip span[aria-hidden] {
  color: var(--rspt-muted);
  font-size: 0.8rem;
}

.rspt-more {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 4px;
}

.rspt-more-n {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #e8f0fc;
  color: var(--rspt-info);
  font-size: 0.78rem;
  font-weight: 700;
}

.rspt-build-h {
  margin: 14px 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--rspt-muted);
}

.rspt-cmp {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--rspt-line);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.rspt-cmp-f {
  flex: 0 0 auto;
  min-width: 92px;
  padding: 8px 10px;
  text-align: center;
  font-size: 1.45rem;
  line-height: 1.2;
  color: var(--rspt-ink);
  background: var(--rspt-soft);
  border-radius: 6px;
  white-space: nowrap;
}

.rspt-cmp-body {
  min-width: 0;
}

.rspt-cmp-body p {
  margin: 6px 0 0;
}

.rspt-cmp-name {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--rspt-ink);
}

.rspt-cmp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.rspt-tag {
  font-size: 0.78rem;
  padding: 2px 9px;
  border-radius: 999px;
  background: #eef0f4;
  color: var(--rspt-ink-body);
  white-space: nowrap;
}

.rspt-tag-ionic {
  background: #fde7e9;
  color: #8a1d2a;
}

.rspt-tag-molecular {
  background: #e3eefc;
  color: #164a99;
}

.rspt-tag-giant {
  background: #e2f3ea;
  color: #1d6b43;
}

.rspt-tag-ion {
  background: #f1e8fa;
  color: #5b2d86;
}

.rspt-cmp-ratio {
  font-size: 0.92rem;
  color: var(--rspt-ink-body);
}

.rspt-cmp-ratio span {
  color: var(--rspt-muted);
}

.rspt-cmp-note {
  color: var(--rspt-muted);
  font-size: 0.94rem;
}

.rspt-cf {
  white-space: nowrap;
}

.rspt-cf sub, .rspt-cf sup {
  font-size: 0.68em;
  line-height: 0;
}

.rspt-found {
  margin-top: 16px;
  border-top: 1px solid var(--rspt-line);
  padding-top: 10px;
}

.rspt-found summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--rspt-ink-body);
}

.rspt-found-bar {
  display: block;
  height: 6px;
  margin: 8px 0 10px;
  background: #e6e9ef;
  border-radius: 999px;
  overflow: hidden;
}

.rspt-found-bar i {
  display: block;
  height: 100%;
  background: var(--rspt-info);
  border-radius: 999px;
}

.rspt-found-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.rspt-found-item {
  font: inherit;
  font-size: 0.85rem;
  min-width: 34px;
  padding: 3px 7px;
  text-align: center;
  border: 1px solid #c9ced8;
  border-radius: 6px;
  background: #fff;
  color: var(--rspt-ink-body);
  cursor: pointer;
}

.rspt-found-item:hover {
  background: #f3f6fb;
}

.rspt-found-no {
  cursor: default;
  color: #b3b8c4;
  background: #f3f4f7;
  border-style: dashed;
}

.rspt-ghost {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  transform: translate(-50%, -60%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(225deg, var(--a), var(--b));
  color: var(--t);
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

.rspt-dragging, .rspt-dragging * {
  cursor: grabbing !important;
  user-select: none;
}

@media (max-width: 560px) {
  .rspt-cmp {
    flex-direction: column;
    gap: 8px;
  }
}

.rspt-tag-polymer {
  background: #e3eefc;
  color: #164a99;
}

.rspt-tag-element {
  background: #fff3d6;
  color: #7a4f01;
}

.rspt-cmp-uses {
  font-size: 0.94rem;
}

.rspt-cmp-uses span {
  display: inline-block;
  margin-right: 6px;
  padding: 0 7px;
  border-radius: 4px;
  background: var(--rspt-soft);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--rspt-muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* Hide the drawing while switching in or out of full screen, then fade it back in */

.rspt > .rspt-scroll, .rspt > .rspt-panel {
  transition: opacity .18s ease;
}

.rspt-switching > .rspt-scroll, .rspt-switching > .rspt-panel {
  opacity: 0;
  transition: none;
}

.rspt-view-metals .rspt-el.rspt-c-superheavy.rspt-selected {
  outline: 3px solid var(--rspt-ink);
  outline-offset: 1px;
}

/* v1.8: larger key tile on our table, and the magnifier */

.rspt-bigkey-box {
  fill: #5f5e5c;
}

.rspt-bigkey .rspt-svgtext {
  fill: #fff;
}

.rspt-artwrap {
  position: relative;
}

.rspt-lens {
  position: absolute;
  z-index: 20;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--rspt-ink);
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  pointer-events: none;
}

.rspt-lens[hidden] {
  display: none;
}

.rspt-lens > svg {
  position: absolute;
  max-width: none !important;
  max-height: none !important;
  height: auto;
}

.rspt-full .rspt-lens {
  width: 300px;
  height: 300px;
}

.rspt-lens-on .rspt-artwrap {
  cursor: zoom-in;
  touch-action: none;
}

/* v1.8.1 (15 Nov 2026): metals view. The metals legend used to be painted over the family chips on a white
   rectangle; the chips' hit areas stayed focusable underneath, and the Colour key row showed family colours
   that do not match the orange/blue table. Hide all three in this view. */

.rspt-view-metals .rspt-furn-key, .rspt-view-metals .rspt-chiphit, .rspt-view-metals .rspt-catrow {
  display: none;
}

/* ---- v1.9 (18 Nov 2026): control job classes inside the table. Sizes follow the table's own small buttons; full screen is bigger. ---- */

.rs-page .rspt .ct-act {
  font-size: 0.85rem;
  min-height: 34px;
  padding: 5px 12px;
}

.rs-page .rspt .ct-chip {
  font-size: 0.85rem;
  min-height: 34px;
  padding: 4px 12px;
}

.rs-page .rspt .ct-switch {
  font-size: 0.85rem;
}

.rs-page .rspt-full .ct-act, .rs-page .rspt-full .ct-chip, .rs-page .rspt-full .ct-switch {
  font-size: 1.02rem;
}

.rs-page .rspt-full .ct-act {
  padding: 8px 16px;
}

.rs-page .rspt-challenge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.rs-page .rspt-hint .ct-act {
  margin-left: 6px;
}

.rs-page .rspt-panelhead .rspt-close {
  margin-left: auto;
  white-space: nowrap;
}

.rspt-seg button[aria-pressed="true"] {
  background: var(--rs-choice-soft,#e3f4f1);
  color: var(--rs-ink,#25242f);
  font-weight: 800;
}

/* Colour system (21 Nov 2026, colour-plan.md): the table's view toggle (Element families, Melting point ...) shows a filled teal dot when chosen */

.rspt-seg button[aria-pressed="true"]::before {
  content: "" !important;
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--rs-choice,#0f766e);
  vertical-align: 1px;
  font-size: 0 !important;
  line-height: 0;
  color: transparent !important;
  overflow: hidden;
}

