:root {
  --bg: #eef2f7;
  --bg-accent: #f7f9fc;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --text: #0f172a;
  --muted: #526277;
  --subtle: #71839b;
  --border: rgba(15, 23, 42, 0.08);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 14px 30px rgba(15, 23, 42, 0.06);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --tile-size: clamp(48px, 3.2vw, 62px);
  --tile-gap: 0.38rem;
  --focus: #0f172a;

  --cat-alkali-metal: #d8eef2;
  --cat-alkaline-earth-metal: #f6dbdf;
  --cat-transition-metal: #e6ddfb;
  --cat-post-transition-metal: #dfe9dd;
  --cat-metalloid: #efe3bf;
  --cat-nonmetal: #dfe9fb;
  --cat-halogen: #d9e3fb;
  --cat-noble-gas: #f7dde8;
  --cat-lanthanide: #dce4ed;
  --cat-actinide: #f7e0d3;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.8) 0%, transparent 28%),
    linear-gradient(180deg, #f5f7fb 0%, #edf2f8 100%);
}

html.embed-mode body {
  min-height: 0;
}

html.embed-mode {
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --tile-gap: 1px;
  --tile-size: clamp(16px, calc((100vw - 3.75rem) / 18), 34px);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(1600px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
}

html.embed-mode .page-shell {
  width: 100%;
  padding: clamp(0.55rem, 1.25vw, 0.9rem) clamp(0.6rem, 1.35vw, 0.95rem);
}

html.embed-mode .demo-nav {
  display: none;
}

html.embed-mode .header-copy {
  display: none;
}

html.embed-mode .page-header {
  grid-template-columns: 1fr;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.page-header {
  display: grid;
  gap: 1rem;
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 1rem;
}

.header-copy h1 {
  margin: 0.25rem 0 0;
  font-size: clamp(2rem, 2.4vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.subtitle,
.table-instruction,
.detail-category,
.atom-note,
#detailBlurb,
.subtle {
  color: var(--muted);
}

.subtitle {
  max-width: 62rem;
  margin: 0.8rem 0 0;
  font-size: 1rem;
  line-height: 1.6;
}

.eyebrow {
  margin: 0;
  color: var(--subtle);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.toolbar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

html.embed-mode .toolbar {
  gap: 0.45rem;
}

.search-field {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  width: min(100%, 28rem);
  min-width: 0;
  flex: 0 1 28rem;
  padding: 0.9rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

html.embed-mode .search-field {
  width: min(100%, 22rem);
  min-width: 0;
  flex: 1 1 auto;
  padding: 0.68rem 0.8rem;
}

.search-field:focus-within {
  outline: 2px solid rgba(15, 23, 42, 0.18);
  outline-offset: 2px;
}

.search-icon {
  width: 1.15rem;
  height: 1.15rem;
  fill: var(--subtle);
  flex: none;
}

.search-field input {
  border: 0;
  background: transparent;
  color: var(--text);
  width: 100%;
  outline: none;
}

.ghost-button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  border-radius: 999px;
  padding: 0.85rem 1rem;
  flex: none;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

html.embed-mode .ghost-button {
  padding: 0.68rem 0.8rem;
  font-size: 0.82rem;
}

.ghost-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.96);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 410px);
  gap: 1rem;
  align-items: start;
}

html.embed-mode .workspace {
  gap: 0.55rem;
}

.table-card,
.detail-card {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.table-card {
  border-radius: var(--radius-xl);
  padding: 1rem;
}

html.embed-mode .table-card {
  padding: 0.28rem;
}

.detail-card {
  position: sticky;
  top: 1rem;
  border-radius: var(--radius-xl);
  padding: 1.15rem;
  overflow: hidden;
}

html.embed-mode .detail-card {
  display: grid;
  grid-template-columns: minmax(124px, 164px) minmax(108px, 136px) minmax(0, 1fr);
  grid-template-areas:
    "header header header"
    "atom stats config";
  gap: 0.32rem;
  align-items: start;
  padding: 0.52rem;
}

.detail-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--accent-color, rgba(15, 23, 42, 0.18));
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

html.embed-mode .section-heading,
html.embed-mode .section-heading.compact {
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.section-heading h2,
.section-heading h3 {
  margin: 0.18rem 0 0;
  letter-spacing: -0.03em;
}

.section-heading.compact {
  align-items: center;
  margin-bottom: 0.8rem;
}

.section-heading.compact h3 {
  font-size: 1.1rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

html.embed-mode .legend {
  gap: 0.28rem;
  margin-bottom: 0.45rem;
}

.legend-chip {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  border-radius: 999px;
  padding: 0.52rem 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

html.embed-mode .legend-chip {
  padding: 0.32rem 0.48rem;
  gap: 0.28rem;
  font-size: 0.72rem;
}

.legend-chip::before,
.detail-category::before {
  content: "";
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: var(--accent-color, #94a3b8);
  display: inline-block;
  flex: none;
}

.legend-chip:hover {
  transform: translateY(-1px);
}

.legend-chip.is-active {
  border-color: rgba(15, 23, 42, 0.22);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.table-scroll {
  position: relative;
  overflow-x: auto;
  padding-bottom: 0.35rem;
}

html.embed-mode .table-scroll {
  overflow: visible;
  padding-bottom: 0;
}

.periodic-grid {
  display: grid;
  grid-template-columns: repeat(18, var(--tile-size));
  grid-template-rows: repeat(10, var(--tile-size));
  gap: var(--tile-gap);
  min-width: fit-content;
  position: relative;
}

html.embed-mode .periodic-grid {
  min-width: 0;
  width: 100%;
  margin-inline: 0;
}

.series-label {
  align-self: center;
  justify-self: stretch;
  height: calc(var(--tile-size) - 6px);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(15, 23, 42, 0.12);
  color: var(--subtle);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.08rem;
  padding: 0.2rem 0.55rem;
  background: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

html.embed-mode .series-label {
  height: calc(var(--tile-size) - 2px);
  gap: 0;
  padding: 0.08rem 0.12rem;
}

.series-label strong {
  font-size: 0.72rem;
  font-weight: 700;
}

html.embed-mode .series-label strong {
  font-size: 0.42rem;
  line-height: 1.1;
}

.series-label span {
  font-size: 0.68rem;
}

html.embed-mode .series-label span {
  display: none;
}

.element-card {
  border: 0;
  border-radius: 14px;
  padding: 0.32rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    opacity 180ms ease,
    filter 180ms ease,
    outline-color 180ms ease;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
  color: rgba(15, 23, 42, 0.72);
  font-family: "Google Sans", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html.embed-mode .element-card {
  border-radius: 7px;
  padding: 0.08rem;
}

.element-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 18px rgba(15, 23, 42, 0.10),
    inset 0 0 0 1px rgba(255, 255, 255, 0.46);
}

.element-card:focus-visible,
.legend-chip:focus-visible,
.ghost-button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.element-card.is-selected {
  transform: translateY(-1px);
  box-shadow:
    0 12px 24px rgba(15, 23, 42, 0.12),
    inset 0 0 0 2px rgba(15, 23, 42, 0.65),
    inset 0 0 0 3px rgba(255, 255, 255, 0.5);
  color: rgba(15, 23, 42, 0.95);
}

.element-card.is-dimmed {
  opacity: 0.22;
  filter: saturate(0.45);
}

.element-number {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
}

html.embed-mode .element-number {
  font-size: clamp(0.38rem, 0.95vw, 0.6rem);
}

.element-symbol {
  display: block;
  font-size: clamp(1.18rem, 1.25vw + 0.6rem, 1.72rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-top: auto;
}

html.embed-mode .element-symbol {
  font-size: clamp(0.74rem, 1.7vw, 1.12rem);
}

.element-name {
  display: block;
  font-size: 0.66rem;
  line-height: 1.12;
  margin-top: 0.18rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.embed-mode .element-name {
  display: none;
}

.cat-alkali-metal { background: var(--cat-alkali-metal); --accent-color: #85c7d4; }
.cat-alkaline-earth-metal { background: var(--cat-alkaline-earth-metal); --accent-color: #ec9cac; }
.cat-transition-metal { background: var(--cat-transition-metal); --accent-color: #9b86e7; }
.cat-post-transition-metal { background: var(--cat-post-transition-metal); --accent-color: #9bb783; }
.cat-metalloid { background: var(--cat-metalloid); --accent-color: #d1b267; }
.cat-nonmetal { background: var(--cat-nonmetal); --accent-color: #8da8eb; }
.cat-halogen { background: var(--cat-halogen); --accent-color: #8196e0; }
.cat-noble-gas { background: var(--cat-noble-gas); --accent-color: #eca0c5; }
.cat-lanthanide { background: var(--cat-lanthanide); --accent-color: #8aa1b8; }
.cat-actinide { background: var(--cat-actinide); --accent-color: #d89b7c; }

.detail-header {
  margin-bottom: 0.9rem;
}

html.embed-mode .detail-header {
  grid-area: header;
  margin-bottom: 0.3rem;
}

.detail-kicker {
  margin: 0;
  color: var(--subtle);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.detail-title {
  margin: 0.45rem 0 0;
  font-size: clamp(1.9rem, 2vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

html.embed-mode .detail-title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}

.detail-category {
  margin: 0.8rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

html.embed-mode .detail-kicker,
html.embed-mode .detail-category {
  display: none;
}

.atom-panel,
.info-block,
.stats-grid {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.68);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

html.embed-mode .atom-panel,
html.embed-mode .info-block,
html.embed-mode .stats-grid {
  padding: 0.62rem;
}

.atom-panel {
  margin-bottom: 0.9rem;
}

html.embed-mode .atom-panel {
  grid-area: atom;
  margin-bottom: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

html.embed-mode .atom-panel .section-heading {
  display: none;
}

.atom-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 250px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.98), rgba(239, 245, 252, 0.92) 45%, rgba(227, 235, 245, 0.9) 100%);
}

html.embed-mode .atom-canvas-wrap {
  min-height: 132px;
  max-width: 172px;
  margin-inline: auto;
}

#atomCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

html.embed-mode .stats-grid {
  grid-area: stats;
  align-self: start;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(4, auto);
  gap: 0.2rem;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin-bottom: 0;
}

.stat-card {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  padding: 0.78rem 0.8rem;
  min-height: 74px;
}

html.embed-mode .stat-card {
  width: 100%;
  min-height: 0;
  padding: 0.28rem 0.38rem;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
}

.stat-label {
  display: block;
  color: var(--subtle);
  font-size: 0.72rem;
  line-height: 1.2;
}

.stat-value {
  display: block;
  margin-top: 0.3rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

html.embed-mode .stat-label {
  font-size: 0.52rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

html.embed-mode .stat-value {
  margin-top: 0;
  font-size: 0.78rem;
  line-height: 1;
}

.info-block {
  margin-bottom: 0.9rem;
}

html.embed-mode .info-block[aria-labelledby="configHeading"] {
  grid-area: config;
  align-self: start;
  padding: 0.4rem 0.48rem;
  margin-bottom: 0;
}

html.embed-mode .info-block[aria-labelledby="configHeading"] .info-block-heading {
  margin-bottom: 0.22rem;
}

html.embed-mode .info-block[aria-labelledby="configHeading"] h3 {
  margin-bottom: 0;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

html.embed-mode .info-block[aria-labelledby="configHeading"] .mono {
  font-size: 0.76rem;
  line-height: 1.24;
}

html.embed-mode .info-block[aria-labelledby="notesHeading"] {
  display: none;
}

.info-block:last-child {
  margin-bottom: 0;
}

.info-block h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.info-block-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.info-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.38rem 0.65rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.mono {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.93rem;
  line-height: 1.55;
  color: #122031;
  overflow-wrap: anywhere;
}

html.embed-mode .mono {
  font-size: 0.82rem;
  line-height: 1.45;
}

html.embed-mode #detailConfigFull,
html.embed-mode #outerElectronPill,
html.embed-mode #shellChips {
  display: none;
}

.mono.subtle {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.shell-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

html.embed-mode .shell-chips {
  gap: 0.28rem;
  margin-top: 0.45rem;
}

.shell-chip {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 0.42rem 0.64rem;
  color: var(--text);
  font-size: 0.82rem;
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
}

html.embed-mode .shell-chip {
  padding: 0.24rem 0.38rem;
  font-size: 0.72rem;
}

.shell-chip strong {
  font-size: 0.74rem;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.subatomic-reps {
  --subatomic-accent: #2f6b6c;
  --subatomic-accent-soft: #88a6a6;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

html.embed-mode .subatomic-reps {
  gap: 0.28rem;
  margin-top: 0.3rem;
}

.subatomic-card {
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  padding: 0.72rem 0.78rem;
}

html.embed-mode .subatomic-card {
  border-radius: 10px;
  padding: 0.32rem 0.36rem;
}

.subatomic-heading {
  margin: 0 0 0.65rem;
  color: var(--subtle);
  font-size: 0.72rem;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

html.embed-mode .subatomic-heading {
  margin-bottom: 0.24rem;
  font-size: 0.58rem;
}

.subatomic-bars {
  display: grid;
  gap: 0.52rem;
}

html.embed-mode .subatomic-bars {
  gap: 0.26rem;
}

.subatomic-bar-row {
  display: grid;
  grid-template-columns: 0.8rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

html.embed-mode .subatomic-bar-row {
  grid-template-columns: 0.72rem minmax(0, 1fr) auto;
  gap: 0.4rem;
}

.subatomic-bar-label {
  color: var(--text);
  font-family: "Google Sans", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  text-transform: lowercase;
}

html.embed-mode .subatomic-bar-label {
  font-size: 0.74rem;
}

.subatomic-bar-track {
  position: relative;
  height: 0.58rem;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(234, 229, 217, 0.74);
}

html.embed-mode .subatomic-bar-track {
  height: 0.42rem;
}

.subatomic-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--subatomic-accent);
}

.subatomic-bar-count {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  white-space: nowrap;
}

html.embed-mode .subatomic-bar-count {
  font-size: 0.64rem;
}

.pca-signature {
  min-width: 0;
}

.pca-signature-frame {
  display: grid;
  gap: 0.35rem;
}

html.embed-mode .pca-signature-frame {
  gap: 0.22rem;
}

.pca-signature-plot {
  position: relative;
  height: 6.8rem;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(234, 229, 217, 0.74);
  padding: 0.45rem 0.22rem 0.3rem;
}

html.embed-mode .pca-signature-plot {
  height: 4.05rem;
  border-radius: 10px;
  padding: 0.24rem 0.12rem 0.18rem;
}

.pca-signature-baseline {
  position: absolute;
  left: 0.35rem;
  right: 0.35rem;
  top: 50%;
  border-top: 1px solid rgba(15, 23, 42, 0.14);
  z-index: 0;
}

html.embed-mode .pca-signature-baseline {
  left: 0.28rem;
  right: 0.28rem;
}

.pca-signature-guide {
  position: absolute;
  top: 0.55rem;
  bottom: 0.5rem;
  width: 1px;
  background: rgba(15, 23, 42, 0.07);
  z-index: 0;
}

html.embed-mode .pca-signature-guide {
  top: 0.3rem;
  bottom: 0.28rem;
}

.pca-signature-bars {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 0.14rem;
  height: 100%;
  align-items: stretch;
}

html.embed-mode .pca-signature-bars {
  gap: 0.08rem;
}

.pca-signature-slot {
  position: relative;
}

.pca-signature-bar {
  position: absolute;
  left: 18%;
  width: 64%;
  border-radius: 999px;
}

.pca-signature-bar.is-positive {
  bottom: 50%;
  background: var(--subatomic-accent);
}

.pca-signature-bar.is-negative {
  top: 50%;
  background: var(--subatomic-accent-soft);
}

.pca-signature-ticks {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  color: var(--subtle);
  font-size: 0.66rem;
  line-height: 1;
}

html.embed-mode .pca-signature-ticks {
  font-size: 0.54rem;
}

.pca-signature-ticks span {
  justify-self: center;
}

.pca-signature-ticks span.is-start {
  justify-self: start;
}

.pca-signature-ticks span.is-end {
  justify-self: end;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  background: rgba(245, 248, 252, 0.78);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1200px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .detail-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100%, calc(100% - 1rem));
    padding-top: 0.75rem;
  }

  html.embed-mode .page-shell {
    width: 100%;
    padding: 0.6rem;
  }

  html.embed-mode {
    --tile-size: clamp(14px, calc((100vw - 2.9rem) / 18), 28px);
  }

  html.embed-mode .detail-card {
    grid-template-columns: minmax(96px, 122px) minmax(0, 1fr);
    grid-template-areas:
      "header header"
      "atom stats"
      "config config";
    gap: 0.34rem;
    padding: 0.5rem;
  }

  .page-header {
    grid-template-columns: 1fr;
  }

  .toolbar {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .search-field {
    width: 100%;
    min-width: 100%;
    flex-basis: 100%;
  }

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

  .subatomic-reps {
    grid-template-columns: 1fr;
  }

  .detail-card,
  .table-card {
    padding: 0.9rem;
  }

  .section-heading,
  .section-heading.compact {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-instruction {
    margin: 0;
  }
}
