.a353-episode {
  --a353-ink:#e6f2f6;
  --a353-signal:#a4f1d9;
  --a353-border:#83afc05c;
  --a353-proton:#ffd0a5;
  --a353-neutron:#ddd0ff;
  background:linear-gradient(145deg,#101f32f5,#101c2ef7 55%,#211e38f7);
  border:1px solid var(--a353-border);
  border-radius:1rem;
  padding:clamp(.8rem,3vw,2rem);
  max-width:980px;
  margin-inline:auto;
  color:var(--a353-ink);
}
#chemistry-study .a353-header p {
  margin:0 0 .35rem;
  color:var(--a353-signal);
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size:.74rem;
  font-weight:750;
}
#chemistry-study .a353-episode h2 { margin:0 0 .95rem; font-size:clamp(1.55rem,3.5vw,2.6rem); }
.a353-acts {
  list-style:none;
  padding:0;
  margin:0 0 1rem;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:.5rem;
}
#chemistry-study .a353-acts button {
  display:flex; align-items:center; gap:.55rem; height:100%; width:100%;
  padding:.55rem .65rem; text-align:left; border:1px solid #6d84a07e;
  border-radius:.5rem; color:#e2e8f6; background:#17283d; line-height:1.25;
}
.a353-acts button span { color:#b9aaf3; font:750 .76rem ui-monospace,monospace; }
#chemistry-study .a353-acts button[aria-current="step"] {
  border-color:#bca8f3; color:#faf4ff; background:#372e56;
  box-shadow:inset 0 -3px #bca8f3;
}
.a353-observer {
  position:relative;
  isolation:isolate;
  display:grid;
  place-items:center;
  min-width:0;
  overflow:hidden;
  background:radial-gradient(ellipse at 50% 50%,#192e48,#071520 73%);
  border:1px solid var(--a353-border);
  border-radius:.75rem;
}
#chemistry-study .a353-episode svg { display:block; stroke:none; width:100%; height:auto; }
#chemistry-study .a353-observer svg { max-width:630px; }
#chemistry-study .a353-core-view svg { max-width:430px; }
#chemistry-study .a353-episode svg text { fill:#e1f1fc; font:650 15px system-ui,sans-serif; stroke:none; }
.a353-zoom-camera { transform-origin:270px 144px; }
.a353-portal {
  position:absolute;
  z-index:1;
  left:50%;
  top:49%;
  width:min(54%,300px);
  aspect-ratio:1;
  border-radius:50%;
  opacity:0;
  pointer-events:none;
  background:radial-gradient(ellipse,#08352d 0 28%,#134b50 42%,#69f1b597 50%,#c5fff6 52%,#a9e5b550 57%,transparent 69%);
  transform:translate(-50%,-50%) scale(.07) rotate(-25deg);
}
.a353-portal::before {
  position:absolute;
  content:'';
  inset:11% 19% 12% 19%;
  border-radius:50%;
  border:3px solid #adffdc;
  border-left-color:#5198bb;
  box-shadow:0 0 20px #69edc4,inset 0 0 24px #83eddb;
}
.a353-observer.is-crossing .a353-zoom-camera { animation:a353-zoom 1s cubic-bezier(.49,.04,.31,1) both; }
.a353-observer.is-crossing :is(.a353-atom-labels,.a353-reticle) { animation:a353-label-fade .25s ease-out both; }
.a353-observer.is-crossing .a353-portal { animation:a353-cross 1s ease-in-out both; }
@keyframes a353-zoom { from { transform:scale(1); } to { transform:scale(13); } }
@keyframes a353-label-fade { to { opacity:0; } }
@keyframes a353-cross {
  0% { opacity:0; }
  44% { opacity:.88; transform:translate(-50%,-50%) scale(.68) rotate(-9deg); }
  88% { opacity:.75; }
  100% { opacity:.2; transform:translate(-50%,-50%) scale(3.9) rotate(20deg); }
}
.a353-core-view.is-arriving { animation:a353-arrive .24s ease-out; }
@keyframes a353-arrive { from { opacity:.5; } }
.a353-boundary { fill:#302b4c; fill-opacity:.45; stroke:#c1a9ee; stroke-opacity:.7; stroke-width:1.3; stroke-dasharray:5 6; }
.a353-p .a353-bead { stroke:#ffdbbb; stroke-width:1.1; }
.a353-n .a353-bead { stroke:#dbcaff; stroke-width:1.1; }
#chemistry-study .a353-episode svg .a353-particle text { fill:#251e31; font-size:11px; font-weight:800; }
.a353-particle.is-dim { opacity:.24; }
.a353-particle.is-next { cursor:pointer; }
.a353-particle.is-next .a353-bead,.a353-extra-ring {
  stroke:#f4efb5; stroke-width:2.4;
  filter:drop-shadow(0 0 3px #bfffdc);
}
.a353-extra-ring { fill:none; stroke-dasharray:3 3; }
.a353-copy { margin:1rem 0 .75rem; }
#chemistry-study .a353-copy h3 {
  color:#f0f8fb;
  font:750 clamp(1.1rem,2.5vw,1.43rem)/1.2 system-ui,sans-serif;
  margin:0 0 .4rem;
}
#chemistry-study .a353-copy p { color:#cee1ea; margin:0; line-height:1.55; }
.a353-actions,.a353-filters { display:flex; flex-wrap:wrap; gap:.5rem; margin:.6rem 0; }
#chemistry-study .a353-actions button {
  color:#142e2b; background:#a8eed7; border-color:#c3f8e3; box-shadow:none;
}
#chemistry-study .a353-actions .a353-secondary,#chemistry-study .a353-filters button {
  color:var(--a353-ink); background:#163441; border-color:#7ea6b1;
}
#chemistry-study .a353-filters button[aria-pressed=true] { color:#142e2b; background:#a8eed7; }
#chemistry-study .a353-episode button:not(:disabled):hover { filter:brightness(1.12); }
.a353-compare { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.55rem; }
.a353-isotope {
  min-width:0;
  margin:0;
  padding:.6rem .45rem;
  text-align:center;
  background:radial-gradient(ellipse at 50% 45%,#342e56,#131b30 76%);
  border:1px solid var(--a353-border);
  border-radius:.65rem;
}
.a353-isotope figcaption { display:flex; gap:.55rem; align-items:center; justify-content:center; font-size:.88rem; margin-bottom:.2rem; }
.a353-isotope:first-child { border-top:2px solid #8ccfbe; }
.a353-isotope:last-child { border-top:2px solid #bd9de8; }
.a355-isotope-symbol { color:#e5d8ff; font:700 1.3rem Georgia,serif; white-space:nowrap; }
.a355-isotope-symbol sup { font-size:.66em; margin-right:.1rem; }
#chemistry-study .a353-isotope svg { max-width:215px; margin-inline:auto; }
.a353-counts { display:flex; gap:.45rem; justify-content:center; flex-wrap:wrap; }
.a353-counts span { padding:.3rem .5rem; font-size:.79rem; border-radius:.4rem; background:#0d1729; }
.a353-counts b { font-size:1.1rem; font-variant-numeric:tabular-nums; }
.a353-proton { color:var(--a353-proton); }
.a353-neutron { color:var(--a353-neutron); }
#chemistry-study .a353-readout { color:#c8f7e4; margin:.55rem 0; line-height:1.45; }
#chemistry-study .a353-readout:empty,#chemistry-study [data-a353-feedback]:empty { display:none; }
#chemistry-study .a353-question { min-inline-size:0; border:1px solid var(--a353-border); padding:.65rem; margin:.8rem 0 0; border-radius:.5rem; }
#chemistry-study .a353-question legend { max-width:100%; padding:0 .3rem; font-weight:750; }
#chemistry-study .a353-question label { display:flex; align-items:baseline; gap:.4rem; padding:.4rem .15rem; }
.a353-question input { accent-color:var(--a353-signal); flex:none; }
#chemistry-study [data-a353-feedback] { color:#d8f6e6; margin:.55rem 0 0; }
#chemistry-study .a353-note { margin:.8rem 0 0; font-size:.8rem; color:#abc4d1; line-height:1.45; }

@media(max-width:470px) {
  #chemistry-study .a353-atom text { font-size:19px; }
  #chemistry-study .a353-episode button { padding:.52rem .6rem; }
  .a353-filters button { flex:1 1 7.2rem; }
}
@media(prefers-reduced-motion:reduce) {
  .a353-episode :is(.a353-zoom-camera,.a353-portal,.a353-atom-labels,.a353-reticle,.a353-core-view) { animation:none; }
}

.a354-fichas,.a354-change {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.55rem;
}
.a354-fichas > div,.a354-change > div {
  display:grid;
  gap:.38rem;
  padding:.65rem;
  background:#0d2835;
  border:1px solid var(--a353-border);
  border-radius:.6rem;
}
.a354-fichas b { color:#a4f1d9; }
.a354-fichas .a354-radioactive { color:#ffd39c; }
.a354-fichas span,.a354-change div span { color:#cbdfe8; }
#chemistry-study .a354-explanation { margin:.8rem 0; }
.a354-decay {
  padding:.8rem;
  border:1px solid var(--a353-border);
  border-radius:.7rem;
  background:#102733;
  animation:a354-reveal .28s ease-out;
}
.a354-change { grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; }
.a354-change > span { color:var(--a353-signal); font-weight:800; }
#chemistry-study .a354-decay p { margin:.65rem 0 0; line-height:1.55; }
@keyframes a354-reveal { from { opacity:.4; transform:translateY(-5px); } }
@media(max-width:570px) {
  .a353-acts { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .a354-fichas { grid-template-columns:minmax(0,1fr); }
  .a354-fichas > div { grid-template-columns:minmax(0,1fr) auto; }
  .a354-fichas b { grid-column:2; grid-row:1; }
  .a354-fichas span { grid-column:1 / -1; }
}
@media(prefers-reduced-motion:reduce) { .a354-decay { animation:none; } }

.a354-nucleus-lab .a349-setup { gap:.6rem; }
.a354-facts {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.4rem;
  margin:0;
}
.a354-facts > div {
  padding:.45rem;
  border-radius:.4rem;
  border:1px solid #709ba2;
  background:#132f3d;
}
.a354-facts dt { color:#c7dbe2; font-size:.78rem; line-height:1.35; }
.a354-facts dd { font-size:1.1rem; font-weight:800; margin:.2rem 0 0; color:#ffe4bd; }
.a354-count-form { display:grid; gap:.45rem; }
#chemistry-study .a354-count-form .a349-live { margin:0; padding:.55rem .6rem; font-size:.92rem; overflow-wrap:anywhere; }
#chemistry-study .a354-count-form .a349-live:empty { display:none; }
#chemistry-study .a354-nucleus-lab [aria-pressed=true] { border-color:#a8eed7; color:#dff8ee; box-shadow:inset 0 -3px #a8eed7; }

#chemistry-study .a355-context { margin:.6rem 0 .9rem; color:#d9e2f0; }
.a355-count-layout { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); gap:.7rem; }
.a355-count-layout .a353-core-view { background:radial-gradient(ellipse,#342d55,#0b172b 73%); }
.a355-count-console,.a355-formula {
  min-width:0; padding:clamp(.7rem,2vw,1.1rem);
  border:1px solid #9298bc69; border-radius:.65rem; background:#1c263d;
}
#chemistry-study :is(.a355-count-console,.a355-formula) h4 { margin:0 0 .4rem; color:#f0e9ff; font:750 1.03rem system-ui,sans-serif; }
#chemistry-study :is(.a355-count-console,.a355-formula) p { margin:0 0 .5rem; color:#dbe5f5; line-height:1.55; }
.a355-tally { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:.28rem; list-style:none; padding:0; margin:.85rem 0; }
.a355-tally li {
  display:grid; place-items:center; min-height:1.95rem; border-radius:.35rem;
  border:1px solid #8490ae77; color:#bac6dd; font-weight:750; background:#141d31;
}
.a355-tally li.is-counted { color:#342032; border-color:#ffd0a5; background:#ffd0a5; }
.a355-legend { display:flex; flex-wrap:wrap; gap:.4rem 1rem; margin:.65rem 0; font-size:.86rem; }
.a355-formula { margin:.8rem 0; }
.a355-math { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.4rem; }
.a355-math math { padding:.6rem .35rem; color:#f1e8ff; background:#111a2c; border-radius:.35rem; font-size:1.17rem; }
#chemistry-study .a355-example { margin:.6rem 0 0; }
.a353-reference {
  margin:1.25rem auto 0; max-width:980px; min-width:0;
  border:1px solid #889cb87d; border-radius:.85rem; padding:clamp(.8rem,3vw,1.4rem);
  color:#e5edf8; background:#0d1d2bf5;
}
#chemistry-study .a353-reference > h2 { margin:0 0 .75rem; font-size:clamp(1.35rem,3vw,1.9rem); }
#chemistry-study .a353-reference .c318-reading { display:block; }
#chemistry-study .a353-reference .c318-topics { display:flex; flex-flow:row wrap; gap:.4rem; margin:0 0 .7rem; }
#chemistry-study .a353-reference .c318-topics button { flex:1 1 11rem; padding:.55rem .6rem; min-width:0; white-space:normal; }
#chemistry-study .a353-reference .c318-document { min-height:0; }
@media(max-width:720px) { .a355-count-layout { grid-template-columns:minmax(0,1fr); } }
