:root {
  color-scheme:dark;
  --bg:#0b1422;
  --card:#132236;
  --ink:#eff5fc;
  --muted:#bdcddd;
  --line:#425973;
  --accent:#76e8c5;
  --blue:#b7dcff
}

* {
  box-sizing:border-box
}
body {
  margin:0;
  background:radial-gradient(ellipse at top right,#12394c,transparent 60%),var(--bg);
  color:var(--ink);
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  line-height:1.65
}
a {
  color:var(--accent);
  text-underline-offset:4px
}
header,nav,main,footer {
  max-width:1200px;
  margin:auto;
  padding:20px 30px
}
header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px
}
header a {
  text-decoration:none
}
.brand {
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--ink);
  font-size:23px;
  font-weight:650
}
.brand img {
  border-radius:50%
}
.home-link {
  font-size:14px
}
nav {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  padding-top:0
}
nav a {
  color:var(--muted);
  text-decoration:none;
  padding:9px 14px;
  border:2px solid transparent;
  border-radius:10px
}
nav a[aria-current] {
  border-color:var(--accent);
  color:var(--ink)
}
nav a:hover {
  background:#1b324a
}
.kicker {
  font-size:13px;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--accent);
  margin:18px 0 8px
}
h1 {
  font-size:clamp(30px,4.2vw,48px);
  line-height:1.15;
  font-weight:600;
  margin:0 0 18px;
  max-width:900px
}
h2 {
  font-size:22px;
  line-height:1.35;
  font-weight:600;
  margin:0 0 18px
}
p {
  margin:0 0 18px
}
.lead {
  font-size:18px;
  color:var(--muted);
  max-width:810px;
  margin-bottom:32px
}
.workbench {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1.12fr);
  gap:24px;
  align-items:start
}
.card {
  background:var(--card);
  border:1px solid var(--line);
  border-radius:20px;
  padding:28px;
  min-width:0
}
.card p:last-child {
  margin-bottom:0
}
label {
  display:block;
  font-size:16px;
  color:var(--muted);
  margin:18px 0 7px
}
input,select,button,.button {
  font:inherit;
  min-width:0;
  max-width:100%;
  border:2px solid var(--line);
  border-radius:10px;
  padding:11px 14px;
  line-height:1.4
}
input,select {
  background:#0b192b;
  color:var(--ink);
  width:100%;
  min-height:49px
}
button,.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#1c344e;
  color:var(--ink);
  cursor:pointer;
  text-decoration:none;
  min-height:48px
}
button:hover,.button:hover {
  filter:brightness(1.15)
}
button:disabled {
  opacity:.5;
  cursor:wait
}
.primary {
  background:var(--accent);
  color:#062a24;
  border-color:var(--accent);
  font-weight:600
}
form>button {
  margin-top:24px;
  width:100%
}
.field-pair {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px
}
.hint {
  font-size:14px;
  line-height:1.6;
  color:var(--muted);
  margin:14px 0
}
.error {
  color:#ffcdc8;
  border-left:3px solid #ff9d95;
  padding:10px 14px;
  margin-top:20px;
  background:#44252e
}
.result-lead {
  font-size:22px;
  color:var(--accent);
  overflow-wrap:anywhere
}
.result-list {
  margin:0
}
.result-list>div {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:20px;
  padding:12px 0;
  border-bottom:1px solid var(--line)
}
dt {
  color:var(--muted)
}
dd {
  margin:0;
  text-align:right;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere;
  max-width:68%
}
.result-list .is-source dd {
  color:var(--accent)
}
.reading {
  max-width:900px;
  padding:40px 0 12px;
  color:var(--muted)
}
.reading h2 {
  color:var(--ink);
  margin-top:22px
}
.formula {
  font-size:19px;
  color:var(--accent)
}
.app-callout {
  display:grid;
  grid-template-columns:1fr auto;
  gap:24px;
  align-items:center;
  border-top:1px solid var(--line);
  padding:30px 0;
  margin-top:30px
}
.app-callout p {
  color:var(--muted);
  max-width:700px
}
.store-links {
  display:flex;
  flex-wrap:wrap;
  gap:14px
}
.store-links a {
  display:inline-flex;
  align-items:center
}
.store-links img {
  width:130px;
  height:43px;
  object-fit:contain
}
.store-links a:last-child img {
  width:146px
}
.tool-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px
}
.tool-grid .card {
  display:flex;
  flex-direction:column
}
.tool-grid p {
  color:var(--muted);
  flex:1
}
.search-row button {
  margin-top:12px;
  width:100%
}
.matches {
  display:flex;
  flex-direction:column;
  gap:8px
}
.match {
  width:100%;
  display:flex;
  align-items:start;
  justify-content:space-between;
  text-align:left;
  gap:14px
}
.match span:last-child {
  color:var(--muted);
  font-size:14px;
  overflow-wrap:anywhere;
  max-width:55%;
  text-align:right
}
.match[aria-pressed=true] {
  border-color:var(--accent)
}
#more-results {
  margin-top:16px
}
.nuclide-picker {
  border-bottom:1px solid var(--line);
  padding-bottom:14px
}
summary {
  cursor:pointer;
  color:var(--blue);
  font-size:16px
}
.nuclide-picker .matches {
  max-height:260px;
  overflow:auto
}
.result-actions {
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:24px
}
#decay-chart {
  width:100%;
  height:auto;
  margin-top:24px;
  background:#0b192b;
  border-radius:12px
}
footer {
  display:flex;
  gap:20px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:14px;
  border-top:1px solid var(--line)
}
:focus-visible {
  outline:3px solid var(--accent);
  outline-offset:4px
}
[hidden] {
  display:none!important
}
.skip {
  position:absolute;
  top:-100px;
  left:20px;
  background:var(--card);
  padding:12px;
  z-index:20
}
.skip:focus {
  top:10px
}
@media(max-width:760px) {
  header,nav,main,footer {
  padding-left:20px;
  padding-right:20px
}
.workbench,.tool-grid,.app-callout {
  grid-template-columns:1fr
}
.card {
  padding:22px
}
nav {
  gap:4px
}
nav a {
  padding:7px 9px;
  font-size:14px
}
.lead {
  font-size:17px
}
.field-pair {
  gap:10px
}
.app-callout {
  gap:12px
}
dd {
  max-width:62%
}
.home-link {
  font-size:13px
}

}


/* Keep long element searches beside their reference card. */
.matches { max-height: 420px; overflow-y: auto; padding: 4px; }
@media (max-width: 760px) { .matches { max-height: 320px; } }
