@charset "UTF-8";
:root {
  --paper: #f4f3ed;
  --panel: #fcfbf7;
  --ink: #203c36;
  --muted: #5c6c65;
  --line: #d7ddd3;
  --green: #286b57;
  --green-dark: #1d5141;
  --soft: #e6eee5;
  --gold: #d8ae60;
  --radius: 18px;
  color-scheme: light;
  font:
    14px/1.5 "Segoe UI",
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
select,
summary {
  cursor: pointer;
}
button {
  color: inherit;
}
button:disabled {
  cursor: default;
  opacity: 0.6;
}
a {
  color: var(--green-dark);
  text-underline-offset: 3px;
}
button {
  border: 0;
}
button,
input,
select,
textarea {
  touch-action: manipulation;
}
input,
select,
textarea {
  min-width: 0;
}
input[type="number"],
input[type="search"],
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}
select {
  max-width: 100%;
  padding-right: 26px;
}
input[type="number"] {
  width: 100%;
}
textarea {
  width: 100%;
  resize: vertical;
}
input[type="range"] {
  accent-color: var(--green);
  width: 100%;
  margin: 9px 0;
  cursor: pointer;
}
input[type="checkbox"] {
  accent-color: var(--green);
}
:focus-visible {
  outline: 3px solid #387c9c;
  outline-offset: 3px;
}
button {
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.035em;
}
h1 {
  font-size: 32px;
  line-height: 1.15;
}
h2 {
  font-size: 26px;
  line-height: 1.2;
}
h3 {
  font-size: 14px;
}
small {
  font-weight: 400;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
.app-header {
  display: flex;
  align-items: center;
  gap: 17px;
  margin: 0 auto;
  padding: 26px 36px 22px;
  max-width: 1920px;
}
.brand-mark {
  width: 43px;
  height: 43px;
  background: var(--ink);
  border-radius: 11px;
  color: #f6f4e9;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.brand-mark svg {
  width: 27px;
  height: 27px;
}
.heading .eyebrow {
  margin-bottom: 4px;
}
.version {
  font:
    10px/1.2 "Segoe UI",
    sans-serif;
  letter-spacing: 0.02em;
  color: var(--muted);
  vertical-align: middle;
  display: inline-block;
  margin-left: 16px;
  border: 1px solid var(--line);
  padding: 5px 8px;
  border-radius: 20px;
}
.header-actions {
  margin-left: auto;
  display: flex;
  gap: 9px;
  align-items: center;
}
.quiet-button,
.secondary-button,
.icon-button,
.play-button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 8px;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.quiet-button:hover,
.icon-button:hover {
  background: var(--soft);
}
.secondary-button {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.secondary-button:hover,
.play-button:hover {
  background: var(--green-dark);
}
.icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 18px;
}
.text-button {
  padding: 0;
  background: none;
  color: var(--green-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: inherit;
}
.small-note {
  font-size: 11px;
  color: var(--muted);
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.56fr) minmax(400px, 1fr);
  gap: 22px;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 30px 26px;
  align-items: start;
}
.table-panel,
.experiment-panel,
.details-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.table-panel {
  padding: 24px 20px 20px;
  position: sticky;
  top: 16px;
  overflow: hidden;
}
.section-heading {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-heading .eyebrow {
  margin-bottom: 6px;
}
.section-heading > .small-note {
  max-width: 160px;
  text-align: right;
}
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 160px;
  border-bottom: 1px solid var(--line);
}
.search-field svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke: var(--muted);
  fill: none;
  stroke-width: 1.5;
}
.search-field input {
  border: 0;
  background: none;
  width: 100%;
  padding: 9px 0;
  font-size: 12px;
  outline-offset: 0;
}
.colour-field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}
.colour-field select {
  font-size: 11px;
  border: 0;
  padding-left: 4px;
  background: transparent;
  max-width: 180px;
}
.table-toolbar > .quiet-button {
  padding: 7px 9px;
  font-size: 11px;
}
.table-viewport {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 8px;
}
.periodic-grid {
  display: grid;
  grid-template-columns: 18px repeat(18, minmax(0, 1fr));
  gap: 4px;
  min-width: 680px;
  position: relative;
}
.element {
  position: relative;
  min-width: 0;
  aspect-ratio: 0.75;
  border-radius: 5px;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3px 1px;
  background: var(--family-bg, #e0e9e2);
  transition:
    opacity 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
  color: #1d3831;
}
.element:hover {
  transform: translateY(-2px);
  z-index: 2;
  box-shadow: 0 3px 8px #203c3618;
}
.element.selected {
  outline: 2px solid var(--green-dark);
  outline-offset: 1px;
  z-index: 3;
}
.element.pinned::after {
  content: "◇";
  position: absolute;
  right: 3px;
  top: 0;
  font-size: 11px;
}
.element .atomic-number {
  font-size: 8px;
  line-height: 1;
  align-self: flex-start;
  margin-left: 3px;
  opacity: 0.8;
}
.element .symbol {
  font-size: clamp(14px, 1.45vw, 25px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.04em;
}
.element .element-name {
  font-size: 7px;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.element.dimmed {
  opacity: 0.2;
}
.element.missing {
  background: repeating-linear-gradient(
    135deg,
    #ebece7,
    #ebece7 3px,
    #f7f7f3 3px,
    #f7f7f3 6px
  );
}
.grid-label {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 9px;
  min-height: 17px;
}
.series-placeholder {
  font-size: 8px;
  border: 1px dashed #a9bdb2;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #f0f3eb;
}
.series-placeholder strong {
  font-size: 10px;
  font-weight: 500;
}
.table-guide {
  grid-column: 4/13;
  grid-row: 2/4;
  align-self: center;
  justify-self: start;
  margin-left: 12px;
  max-width: 250px;
  pointer-events: none;
}
.table-guide .guide-title {
  font-family: Georgia, serif;
  font-size: 24px;
  letter-spacing: -0.025em;
  margin-bottom: 4px;
}
.table-guide p:last-child {
  font-size: 11px;
  color: var(--muted);
  max-width: 235px;
}
.f-block-label {
  font-size: 8px;
  color: var(--muted);
  text-align: right;
  align-self: center;
  padding-right: 5px;
}
.colour-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin-top: 16px;
  font-size: 10px;
  color: var(--muted);
  min-height: 42px;
  align-content: start;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.legend-swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
}
.gradient-legend {
  width: min(100%, 310px);
  height: 7px;
  border-radius: 3px;
}
.legend-range {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
}
.table-footnote {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 10px;
}
.discovery {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-top: 22px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}
.discovery-icon {
  font-size: 25px;
  color: var(--green);
}
.discovery p:not(.eyebrow) {
  font-size: 12px;
  line-height: 1.6;
  margin-top: 4px;
  max-width: 470px;
}
.discovery > .quiet-button {
  margin-left: auto;
}
.element-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  max-height: 580px;
  overflow: auto;
}
.list-element {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  border: 1px solid var(--line);
  padding: 9px;
  background: #fff;
  border-radius: 7px;
}
.list-element strong {
  font-size: 20px;
  width: 31px;
}
.list-element span {
  font-size: 12px;
}
.list-element small {
  display: block;
  color: var(--muted);
}
.right-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.experiment-panel {
  overflow: hidden;
}
.view-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding: 0 15px;
  gap: 3px;
}
.view-tabs button {
  font-size: 12px;
  padding: 15px 12px;
  background: transparent;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.view-tabs button[aria-selected="true"] {
  border-bottom-color: var(--green);
  color: var(--green-dark);
  font-weight: 600;
}
.scene-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 19px 21px 15px;
}
.scene-heading h2 {
  font-size: 25px;
  margin-top: 4px;
}
.sample-count {
  font:
    11px "Segoe UI",
    sans-serif;
  letter-spacing: 0;
  color: var(--muted);
  margin-left: 7px;
}
.model-badge,
.reference-badge {
  font-size: 9px;
  letter-spacing: 0.03em;
  padding: 5px 7px;
  background: var(--soft);
  border-radius: 5px;
  color: var(--green-dark);
  white-space: nowrap;
}
.chamber-stage {
  height: 255px;
  margin: 0 14px;
  position: relative;
  border-radius: 11px;
  overflow: hidden;
  background: #142c28;
}
.chamber-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.scene-topline,
.scene-bottomline {
  position: absolute;
  left: 15px;
  right: 15px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  color: #bacfc4;
  font-size: 9px;
  letter-spacing: 0.07em;
}
.scene-topline {
  top: 13px;
}
.scene-topline > span:first-child {
  font-weight: 600;
  color: #d9c28d;
}
.scene-bottomline {
  bottom: 11px;
  font-size: 9px;
  letter-spacing: 0;
}
.scene-bottomline button {
  pointer-events: auto;
  background: transparent;
  color: #cfddd5;
  font-size: 10px;
  padding: 0;
}
.playback {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 21px;
}
.playback-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}
.play-button {
  background: var(--green);
  border-color: var(--green);
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 79px;
  justify-content: center;
}
.playback .icon-button {
  width: 30px;
  height: 32px;
}
.playback .quiet-button {
  border-color: transparent;
}
.clock {
  text-align: right;
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-direction: column;
}
.clock span:first-child {
  font-size: 12px;
}
.clock span:last-child {
  font-size: 9px;
  color: var(--muted);
}
.readings {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  padding: 0 21px 16px;
  gap: 12px;
}
.reading-label {
  font-size: 9px;
  color: var(--muted);
  display: block;
  margin-bottom: 5px;
}
.readings strong {
  display: block;
  font-size: 22px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}
.readings strong small {
  font-size: 12px;
  letter-spacing: 0;
}
.readings .waiting-reading {
  font-size: 14px;
  padding-top: 6px;
  letter-spacing: 0;
  color: var(--muted);
}
.inline-help {
  font-size: 11px;
  background: none;
  color: var(--muted);
  padding: 0;
}
.basic-controls {
  padding: 15px 21px;
  border-top: 1px solid var(--line);
}
.control-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.control-title label {
  font-weight: 600;
}
.control-title output {
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pressure-control,
.target-pressure {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  font-size: 11px;
}
.pressure-control select {
  font-size: 11px;
  padding: 5px 26px 5px 8px;
  max-width: 65%;
}
.target-pressure label {
  flex: 1;
}
.target-pressure label span {
  color: var(--muted);
}
.target-pressure input {
  width: 80px;
  padding: 5px 8px;
}
.target-pressure button {
  padding: 6px 9px;
}
.control-note {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 9px;
}
.advanced-controls,
.chart-details {
  border-top: 1px solid var(--line);
}
summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  font-size: 12px;
  padding: 13px 0;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: "+";
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
  margin-left: auto;
}
details[open] > summary::after {
  content: "−";
}
summary > span {
  font-size: 9px;
  color: var(--muted);
  font-weight: 400;
  margin-left: auto;
}
.advanced-controls > summary,
.chart-details > summary {
  padding: 12px 21px;
}
.advanced-body {
  padding: 0 21px 12px;
}
fieldset {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 13px 0 3px;
  margin: 0 0 14px;
}
legend {
  font-size: 11px;
  font-weight: 600;
  padding-right: 10px;
}
.input-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-bottom: 10px;
}
.input-pair label,
.reference-choice {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
}
.input-pair label span {
  color: var(--muted);
  font-size: 10px;
  display: contents;
}
.input-pair input,
.input-pair select {
  font-size: 12px;
}
.source-facts {
  display: flex;
  justify-content: space-between;
  background: var(--soft);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 11px;
  margin: 9px 0;
}
.number-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  margin: 10px 0;
}
.number-line input {
  width: 110px;
  margin-left: auto;
}
.number-line select {
  margin-left: auto;
}
.number-line > span {
  color: var(--muted);
}
.number-line button {
  padding: 7px 9px;
}
.check-line {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 12px;
  margin: 7px 0;
}
.button-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.chart-wrap {
  padding: 7px 21px;
}
.chart-wrap canvas {
  width: 100%;
  height: 150px;
  display: block;
}
.chart-key {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 9px;
  margin-top: 5px;
}
.sample-key::before,
.wall-key::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 2px;
  vertical-align: middle;
  margin-right: 4px;
  background: var(--green);
}
.wall-key::before {
  background: #a97930;
}
.chart-key > span:last-child {
  margin-left: auto;
}
.energy-summary {
  font-size: 11px;
  padding: 7px 21px;
  color: var(--muted);
}
.readings-table-wrap {
  padding: 8px 21px 14px;
  overflow-x: auto;
}
.readings-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.readings-table caption {
  text-align: left;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 7px;
}
.readings-table td,
.readings-table th {
  padding: 6px 5px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}
.readings-table th:first-child,
.readings-table td:first-child {
  text-align: left;
}
.model-caption {
  font-size: 10px;
  color: var(--muted);
  padding: 12px 21px;
  background: #f1f4ed;
  border-top: 1px solid var(--line);
  line-height: 1.7;
}
.model-caption button {
  font-size: 10px;
  display: inline;
}
.reference-view {
  padding: 22px;
}
.reference-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}
.reference-choice {
  max-width: 200px;
  color: var(--muted);
}
.reference-caption {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 16px;
}
.atom-visual {
  min-height: 250px;
  display: grid;
  place-items: center;
  margin: 10px 0;
}
.atom-visual svg {
  display: block;
  width: 100%;
  max-width: 360px;
  max-height: 330px;
}
.configuration-large {
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--green-dark);
  margin: 18px 0;
}
.orbital-diagram {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 350px;
  overflow: auto;
  padding: 3px;
}
.orbital-row {
  display: flex;
  align-items: center;
  gap: 11px;
}
.orbital-row > span {
  width: 28px;
  font-size: 12px;
  color: var(--muted);
}
.orbital-boxes {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.orbital-box {
  width: 29px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #b6c9ba;
  border-radius: 4px;
  font-size: 16px;
  letter-spacing: -0.1em;
  background: #eef2e8;
}
.orbital-row.valence .orbital-box {
  background: #dce9d9;
  border-color: #6a9979;
}
.details-panel {
  padding: 23px 21px;
}
.element-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}
.identity-tile {
  width: 62px;
  height: 68px;
  flex-shrink: 0;
  background: #e3eacb;
  border: 1px solid #c2d0b1;
  border-radius: 9px;
  padding: 5px 8px;
}
.identity-tile > span {
  font-size: 10px;
  display: block;
}
.identity-tile strong {
  display: block;
  text-align: center;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 500;
}
.element-identity h2 {
  font-size: 29px;
  margin: 2px 0;
}
.element-identity > div:nth-child(2) > p:last-child {
  font-size: 10px;
  color: var(--muted);
}
.element-identity > .icon-button {
  margin-left: auto;
  flex-shrink: 0;
}
.element-identity > .icon-button[aria-pressed="true"] {
  background: var(--soft);
  color: var(--green-dark);
}
.element-summary {
  font-size: 12px;
  line-height: 1.75;
  margin: 19px 0 14px;
  color: #445c52;
}
.element-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 17px;
  gap: 12px 20px;
}
.element-facts > div {
  min-width: 0;
}
.element-facts dt {
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 3px;
}
.element-facts dd {
  font-size: 12px;
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.selection-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 17px;
}
.selection-actions .secondary-button {
  font-size: 11px;
  flex-shrink: 1;
  white-space: normal;
}
.selection-actions .small-note {
  font-size: 9px;
}
.details-panel > details {
  border-top: 1px solid var(--line);
}
.property-list {
  font-size: 12px;
  margin: 0;
}
.property-list > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px dotted var(--line);
}
.property-list dt {
  color: var(--muted);
}
.property-list dd {
  margin: 0;
  text-align: right;
}
.comparison-content {
  font-size: 12px;
  padding: 4px 0 15px;
}
.comparison-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
}
.comparison-table th,
.comparison-table td {
  padding: 8px 5px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}
.comparison-table th:first-child,
.comparison-table td:first-child {
  text-align: left;
  color: var(--muted);
}
.comparison-table caption {
  text-align: left;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 7px;
}
.sources-body {
  font-size: 12px;
  line-height: 1.7;
  padding-bottom: 7px;
}
.sources-body h3 {
  margin: 10px 0 6px;
}
.sources-body p {
  margin-bottom: 12px;
}
.sources-body a {
  font-size: 11px;
}
.investigation-content {
  padding: 13px 0;
  font-size: 12px;
  line-height: 1.7;
}
.investigation-content p {
  margin-bottom: 10px;
}
.investigation-content details {
  margin-top: 12px;
}
.prediction-label {
  display: block;
  font-size: 11px;
  margin-bottom: 6px;
}
#investigation {
  font-size: 12px;
  width: 100%;
  margin-top: 2px;
}
.app-footer {
  max-width: 1920px;
  padding: 0 36px 38px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 10px;
  color: var(--muted);
}
.mobile-navigation {
  display: none;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  transform: translateX(-50%);
  z-index: 100;
  max-width: min(90vw, 550px);
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 12px;
  box-shadow: 0 8px 35px #102a2a22;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 110;
  background: white;
  padding: 12px;
  border: 2px solid var(--green);
}
.skip-link:focus {
  top: 10px;
}
dialog {
  max-width: 520px;
  width: calc(100% - 30px);
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 27px;
  box-shadow: 0 20px 100px #0a201b44;
}
dialog::backdrop {
  background: #152e275c;
  backdrop-filter: blur(4px);
}
.dialog-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 22px;
}
.dialog-heading h2 {
  font-size: 34px;
}
.dialog-heading .icon-button {
  flex-shrink: 0;
}
dialog > p {
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 14px;
}
.noscript {
  padding: 25px;
  background: #fff4da;
}
@media (min-width: 1600px) {
  .element .element-name {
    font-size: 9px;
  }
  .element .atomic-number {
    font-size: 10px;
  }
  .periodic-grid {
    gap: 5px;
  }
  .chamber-stage {
    height: 290px;
  }
  .table-panel {
    padding: 28px;
  }
  .section-heading {
    margin-bottom: 30px;
  }
  .table-guide .guide-title {
    font-size: 30px;
  }
}
@media (max-width: 1250px) {
  .workspace {
    grid-template-columns: minmax(0, 1.4fr) minmax(360px, 1fr);
    gap: 15px;
    padding: 0 18px 22px;
  }
  .app-header {
    padding: 21px 23px;
  }
  .table-panel {
    padding: 19px 12px;
  }
  .periodic-grid {
    min-width: 660px;
  }
  .section-heading > .small-note {
    display: none;
  }
  .colour-field > span {
    display: none;
  }
  .table-toolbar {
    gap: 5px;
  }
  .table-toolbar > .quiet-button {
    padding: 7px;
  }
  .search-field {
    min-width: 135px;
  }
  .colour-field select {
    max-width: 110px;
  }
  .discovery {
    flex-wrap: wrap;
  }
  .discovery > .quiet-button {
    margin-left: 38px;
  }
  .readings {
    gap: 8px;
  }
  .reading-label {
    font-size: 8px;
  }
  .readings strong {
    font-size: 20px;
  }
  .table-guide {
    max-width: 200px;
  }
  .table-guide .guide-title {
    font-size: 21px;
  }
}
@media (max-width: 1040px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .table-panel {
    position: relative;
    top: auto;
    padding: 24px;
  }
  .periodic-grid {
    min-width: 720px;
  }
  .element .symbol {
    font-size: 22px;
  }
  .element .element-name {
    font-size: 9px;
  }
  .right-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 18px;
  }
  .table-guide .guide-title {
    font-size: 27px;
  }
  .chamber-stage {
    height: 240px;
  }
  .table-toolbar {
    gap: 15px;
  }
  .colour-field > span {
    display: inline;
  }
  .colour-field select {
    max-width: 200px;
  }
  .discovery {
    flex-wrap: nowrap;
  }
  .discovery > .quiet-button {
    margin-left: auto;
  }
  .details-panel {
    padding: 21px 17px;
  }
  .view-tabs {
    padding: 0 8px;
  }
  .view-tabs button {
    padding: 14px 9px;
    font-size: 11px;
  }
  .sample-count {
    display: block;
    margin: 5px 0 0;
  }
  .app-footer {
    padding: 0 25px 75px;
  }
}
@media (max-width: 720px) {
  .app-header {
    padding: 18px 16px 16px;
    gap: 10px;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }
  .brand-mark svg {
    width: 23px;
    height: 23px;
  }
  h1 {
    font-size: 26px;
  }
  .heading > .eyebrow {
    font-size: 8px;
  }
  .version {
    display: none;
  }
  .header-actions {
    gap: 7px;
  }
  .header-actions > .quiet-button {
    font-size: 10px;
    padding: 7px;
  }
  .header-actions > .icon-button {
    width: 29px;
    height: 29px;
    font-size: 15px;
  }
  .mobile-navigation {
    display: flex;
    margin: 0 14px 14px;
    border-bottom: 1px solid var(--line);
    gap: 16px;
  }
  .mobile-navigation button {
    background: none;
    padding: 9px 7px;
    font-size: 12px;
    color: var(--muted);
    border-bottom: 2px solid transparent;
  }
  .mobile-navigation button[aria-pressed="true"] {
    border-bottom-color: var(--green);
    color: var(--green-dark);
    font-weight: 600;
  }
  .workspace {
    display: block;
    padding: 0 12px 20px;
  }
  .workspace[data-mobile-view="table"] > .right-column,
  .workspace[data-mobile-view="experiment"] > .table-panel,
  .workspace[data-mobile-view="details"] > .table-panel,
  .workspace[data-mobile-view="experiment"] .details-panel,
  .workspace[data-mobile-view="details"] .experiment-panel {
    display: none;
  }
  .right-column {
    display: block;
  }
  .table-panel {
    padding: 20px 12px;
  }
  .section-heading {
    margin-bottom: 17px;
  }
  .section-heading h2 {
    font-size: 26px;
  }
  .section-heading .eyebrow {
    font-size: 9px;
  }
  .table-toolbar {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
  }
  .search-field {
    flex-basis: 100%;
    min-width: 0;
  }
  .search-field input {
    font-size: 16px;
    padding: 9px 2px;
  }
  .colour-field {
    margin-right: auto;
  }
  .colour-field select {
    font-size: 12px;
    max-width: 220px;
  }
  .table-toolbar > .quiet-button {
    font-size: 12px;
    padding: 8px 12px;
  }
  .periodic-grid {
    min-width: 850px;
    gap: 4px;
  }
  .element {
    min-height: 58px;
  }
  .element .symbol {
    font-size: 22px;
  }
  .element .element-name {
    font-size: 8px;
  }
  .element .atomic-number {
    font-size: 9px;
  }
  .table-guide .guide-title {
    font-size: 25px;
  }
  .table-footnote {
    flex-direction: column;
    gap: 3px;
  }
  .colour-legend {
    font-size: 10px;
    gap: 8px 13px;
  }
  .discovery {
    align-items: start;
    flex-wrap: wrap;
    padding-top: 17px;
    margin-top: 16px;
    gap: 10px;
  }
  .discovery > div {
    flex: 1;
  }
  .discovery p:not(.eyebrow) {
    font-size: 12px;
  }
  .discovery > .quiet-button {
    margin-left: 33px;
  }
  .app-footer {
    display: block;
    font-size: 9px;
    padding: 0 18px 92px;
  }
  .app-footer > span {
    display: block;
    margin-bottom: 5px;
  }
  .scene-heading {
    padding: 19px 17px 14px;
  }
  .scene-heading h2 {
    font-size: 27px;
  }
  .sample-count {
    display: inline;
    margin-left: 5px;
  }
  .chamber-stage {
    height: 270px;
    margin: 0 10px;
  }
  .view-tabs button {
    font-size: 12px;
    padding: 14px 9px;
  }
  .view-tabs {
    justify-content: space-around;
    padding: 0 8px;
  }
  .readings,
  .basic-controls,
  .playback {
    padding-left: 17px;
    padding-right: 17px;
  }
  .readings strong {
    font-size: 25px;
  }
  .reading-label {
    font-size: 9px;
  }
  .readings .waiting-reading {
    font-size: 14px;
  }
  .details-panel {
    padding: 22px 20px;
  }
  .element-identity h2 {
    font-size: 32px;
  }
  .element-summary {
    font-size: 13px;
  }
  .element-facts dt {
    font-size: 10px;
  }
  .element-facts dd {
    font-size: 13px;
  }
  .selection-actions .small-note {
    font-size: 10px;
  }
  .selection-actions .secondary-button {
    font-size: 12px;
  }
  .control-title {
    font-size: 13px;
  }
  .pressure-control {
    font-size: 12px;
  }
  .pressure-control select {
    font-size: 12px;
  }
  .advanced-controls > summary,
  .chart-details > summary {
    padding: 14px 17px;
  }
  .advanced-controls > summary > span {
    font-size: 9px;
  }
  .input-pair input,
  .input-pair select,
  textarea {
    font-size: 16px;
  }
  .number-line input {
    font-size: 14px;
    width: 115px;
  }
  .source-facts {
    font-size: 12px;
  }
  .comparison-table {
    font-size: 12px;
  }
  .toast {
    bottom: 75px;
  }
  .reference-view {
    padding: 22px 17px;
  }
  .orbital-box {
    width: 29px;
  }
  .table-panel .element-list {
    max-height: none;
  }
  .model-caption {
    padding: 12px 17px;
  }
}
@media (max-width: 370px) {
  .header-actions > .quiet-button {
    display: none;
  }
  .sample-count {
    display: block;
    margin: 4px 0 0;
  }
  .model-badge {
    font-size: 8px;
  }
  .readings strong {
    font-size: 22px;
  }
  .readings {
    gap: 7px;
  }
  .readings .reading-label {
    font-size: 8px;
  }
  .basic-controls {
    padding-left: 14px;
    padding-right: 14px;
  }
  .view-tabs button {
    font-size: 11px;
    padding: 14px 6px;
  }
  .number-line {
    flex-wrap: wrap;
  }
  .number-line input {
    width: 100px;
  }
  .advanced-controls > summary > span {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
  .element:hover {
    transform: none;
  }
}
@media print {
  .app-header,
  .header-actions,
  .mobile-navigation,
  .app-footer,
  .playback,
  .basic-controls,
  .advanced-controls,
  .toast {
    display: none;
  }
  .workspace {
    display: block;
    padding: 0;
  }
  .table-panel {
    position: static;
  }
  .right-column {
    display: block;
  }
  .table-viewport {
    overflow: visible;
  }
  .periodic-grid {
    min-width: 0;
  }
  .details-panel {
    break-inside: avoid;
  }
  .experiment-panel {
    margin-top: 15px;
  }
  .chamber-stage {
    print-color-adjust: exact;
  }
  .element {
    print-color-adjust: exact;
  }
}

/* Instrument labels stay readable independently of compact element tiles. */
.reading-label {
  font-size: 11px;
  line-height: 1.35;
  min-height: 29px;
}
.control-title output,
.model-caption,
.model-caption button {
  font-size: 11px;
}
.control-note {
  font-size: 12px;
}
.scene-topline,
.scene-bottomline {
  font-size: 10px;
}
@media (max-width: 370px) {
  .reading-label {
    font-size: 10px;
  }
}
