:root { color-scheme: dark; --atom-bg: #141417; --atom-line: #34343c; --atom-text: #f0eff4; --atom-dim: #aca9b6; --atom-accent: #c7b2ef; --proton: #ff888e; --neutron: #8db8f4; --electron: #efd087; }
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, "Segoe UI", system-ui, sans-serif; background: var(--atom-bg); color: var(--atom-text); letter-spacing: 0; line-height: 1.7; }
a { color: var(--atom-accent); text-decoration: none; }
button { font: inherit; cursor: var(--akts-cursor-pointer, pointer); }
button:disabled { opacity: .35; cursor: var(--akts-cursor-default, default); }
button, a { -webkit-tap-highlight-color: transparent; }
:is(a, button, canvas):focus-visible { outline: 2px solid #c8abf4; outline-offset: 4px; }
.atom-header { max-width: 1280px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 28px; font-size: 13px; border-bottom: 1px solid var(--atom-line); }
.atom-brand { display: inline-flex; gap: 10px; align-items: center; color: var(--atom-text); font-weight: 650; }
.atom-brand img { border-radius: 6px; }
.atom-main { max-width: 1180px; padding: 28px 28px 64px; margin: auto; }
.atom-heading { margin-bottom: 24px; }
.atom-heading > p, .atom-eyebrow { margin: 0; font-size: 11px; font-weight: 700; color: var(--atom-accent); }
.atom-heading h1 { margin: 10px 0; font-size: 34px; line-height: 1.3; }
.atom-heading h1 span { color: var(--atom-accent); }
.atom-heading > span { color: var(--atom-dim); font-size: 13px; }
.atom-lab { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 32px; align-items: start; }
.atom-model { min-width: 0; align-self: start; }
.atom-scene { position: relative; width: 100%; height: min(55dvh, 480px); min-height: 300px; }
.atom-scene canvas, .atom-fallback { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.atom-fallback { opacity: .6; }
.atom-scene canvas { opacity: 0; touch-action: none; }
.atom-scene[data-rendered] canvas { opacity: 1; }
.atom-scene[data-rendered] .atom-fallback, .atom-scene[data-modified="true"] .atom-fallback { visibility: hidden; }
.atom-scene .three-loading { background: var(--atom-bg); color: var(--atom-text); }
.atom-scene .three-loading [data-loading-detail] { color: var(--atom-dim); }
.atom-legend { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; font-size: 11px; color: var(--atom-dim); }
.particle-key { display: inline-flex; align-items: center; gap: 8px; }
.particle-key::before { content: ""; width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: var(--particle-color); }
.particle-p { --particle-color: var(--proton); }
.particle-n { --particle-color: var(--neutron); }
.particle-e { --particle-color: var(--electron); }
.atom-toolbar { display: flex; justify-content: center; gap: 8px; margin: 16px 0 0; }
.atom-toolbar button, .atom-control button { width: 44px; min-width: 44px; height: 44px; padding: 0; border: 1px solid var(--atom-line); border-radius: 8px; background: #242429; color: var(--atom-text); font-size: 20px; }
.atom-toolbar button, .atom-control button, .atom-presets button, .atom-default, .atom-header a { translate: 0 0; scale: 1; transition: background 180ms ease-out, color 180ms ease-out, border-color 180ms ease-out, box-shadow 180ms ease-out, translate 180ms ease-out, scale 160ms ease-out; }
@media (hover: hover) {
  :is(.atom-toolbar button, .atom-control button, .atom-presets button, .atom-default):hover:not(:disabled) { background: #34303e; border-color: #9981b7; translate: 0 -1px; scale: 1.01; box-shadow: 0 5px 12px #00000024; }
  .atom-header a:hover { color: #eee0ff; translate: 0 -1px; }
}
:is(.atom-toolbar button, .atom-control button, .atom-presets button, .atom-default, .atom-header a):is(:active, [data-pressed="true"]):not(:disabled) { translate: 0 1px; scale: .985; box-shadow: none; transition-duration: 90ms; }
.atom-inspector { min-width: 0; padding-left: 28px; border-left: 1px solid var(--atom-line); text-align: center; }
.atom-notation { min-height: 82px; display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 58px; line-height: 1; }
.atom-notation strong { min-width: 56px; font-weight: 650; }
.atom-numbers { display: grid; gap: 6px; text-align: right; font-size: 22px; min-width: 30px; }
.atom-numbers :is(sup, sub) { font-size: inherit; line-height: 1.15; }
.atom-notation > sup { align-self: start; margin-top: 12px; min-width: 24px; font-size: 20px; }
.atom-element { margin: 0; color: var(--atom-dim); font-size: 13px; }
.atom-charge { display: inline-block; margin: 12px 0 20px; padding: 3px 12px; font-size: 12px; color: #b2dfc1; background: #1d3127; border: 1px solid #34563f; border-radius: 999px; }
.atom-charge[data-neutral="false"] { color: #efd099; background: #352b1f; border-color: #655035; }
.atom-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; text-align: left; }
.atom-facts > div { padding: 10px 14px; border: 1px solid var(--atom-line); background: #1e1e23; border-radius: 8px; }
.atom-facts dt { color: var(--atom-dim); font-size: 11px; }
.atom-facts dd { font-size: 23px; font-weight: 650; line-height: 1.4; margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.atom-particle-controls { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--atom-line); }
.atom-control { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.atom-control > span { font-size: 12px; text-align: left; }
.atom-control > div { display: flex; align-items: center; }
.atom-control output { width: 34px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.atom-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 22px; gap: 6px; }
.atom-presets button { min-height: 44px; color: var(--atom-dim); background: transparent; border: 1px solid var(--atom-line); border-radius: 8px; }
.atom-presets button[aria-pressed="true"] { color: #eedfff; background: #3a2c4e; border-color: #9b7bbc; }
.atom-default { margin-top: 10px; min-height: 44px; width: 100%; font-size: 12px; color: var(--atom-accent); background: transparent; border: 1px solid var(--atom-line); border-radius: 8px; }
.atom-live { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.atom-note { max-width: 720px; font-size: 12px; color: var(--atom-dim); margin: 28px 0; line-height: 1.8; }
.atom-learning { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr); gap: 48px; border-top: 1px solid var(--atom-line); padding: 30px 0; }
.atom-learning h2 { font-size: 20px; line-height: 1.5; margin: 8px 0 10px; }
.atom-learning p { color: #c5c1cd; font-size: 13px; margin: 8px 0; line-height: 1.85; }
.atom-learning .atom-eyebrow { color: var(--atom-accent); font-size: 11px; }
.atom-learning .atom-formula { font-size: 22px; color: #d8c0f2; font-weight: 650; margin: 8px 0 16px; }
.atom-learning .atom-formula-small { font-size: 16px; }
.atom-learning .atom-model-limit { color: var(--atom-dim); font-size: 11px; }
.atom-source { display: inline-block; margin-top: 12px; font-size: 11px; text-decoration: underline; text-underline-offset: 4px; }
.atom-isotope-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.atom-isotope-table :is(th, td) { border-bottom: 1px solid var(--atom-line); padding: 10px 6px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.atom-isotope-table thead th { color: var(--atom-dim); font-size: 11px; font-weight: 600; }
.atom-isotope-table :is(th, td):first-child { width: 24%; }
.atom-isotope-table :is(th, td):last-child { width: 34%; }
@media (max-width: 820px) {
  .atom-lab { grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr); gap: 20px; }
  .atom-inspector { padding-left: 18px; }
  .atom-learning { gap: 28px; }
}
@media (max-width: 680px) {
  .atom-header { padding: 14px 16px; font-size: 12px; }
  .atom-main { padding: 22px 16px 40px; }
  .atom-heading h1 { font-size: 28px; }
  .atom-heading > span { font-size: 12px; }
  .atom-lab { display: block; }
  .atom-model { position: sticky; top: 0; z-index: 2; padding: 8px 0 16px; background: var(--atom-bg); border-bottom: 1px solid var(--atom-line); }
  .atom-scene { height: min(31dvh, 260px); min-height: 210px; }
  .atom-toolbar { margin-top: 12px; }
  .atom-legend { gap: 12px; font-size: 10px; }
  .atom-inspector { border-left: 0; padding: 16px 0 0; }
  .atom-notation { min-height: 72px; font-size: 50px; }
  .atom-learning { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 26px 0; }
  .atom-learning .atom-formula { font-size: 20px; }
  .atom-learning .atom-formula-small { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .atom-toolbar button, .atom-control button, .atom-presets button, .atom-default, .atom-header a { transition: none; }
  :is(.atom-toolbar button, .atom-control button, .atom-presets button, .atom-default, .atom-header a):is(:hover, :active, [data-pressed="true"]):not(:disabled) { translate: none; scale: none; }
}
