:root {
  --accent: #0e7490;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #67e8f9;
    --on-accent: #002028;
  }
}

.tool {
  margin-top: 4px;
}

.mono {
  font-family: var(--mono);
  font-size: 0.88rem;
}

.element-grid-wrap {
  margin: 12px 0;
  overflow-x: auto;
  padding-bottom: 6px;
}
.element-grid {
  display: grid;
  grid-template-columns: repeat(18, minmax(38px, 1fr));
  grid-template-rows: repeat(10, minmax(46px, auto));
  gap: 3px;
  min-width: 720px;
}
.element {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 2px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 5px;
  background: var(--surface-2);
  color: #111;
  text-align: center;
  overflow: hidden;
}
.element-number {
  font-size: 0.52rem;
  line-height: 1;
  opacity: 0.7;
}
.element-symbol {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.1;
}
.element-name {
  font-size: 0.48rem;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.element.alkali { background: #ffd8a8; }
.element.alkaline { background: #ffe8a3; }
.element.transition { background: #c7e9ff; }
.element.post { background: #d9f2e6; }
.element.metalloid { background: #e3d9ff; }
.element.nonmetal { background: #d8f5c8; }
.element.noble { background: #ffd6e8; }
.element.lanthanide { background: #f3e0ff; }
.element.actinide { background: #ffe0d6; }
.element.unknown { background: #e5e5ea; }

.element-results .mk-row-title {
  font-weight: 600;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 12px;
}
@media (min-width: 620px) {
  .field-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.result-card {
  margin: 12px 0;
}
.value-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 0.5px solid var(--line);
}
.value-row:last-child {
  border-bottom: 0;
}
.value-label {
  color: var(--muted);
  font-size: 0.86rem;
}
.value-number {
  font-variant-numeric: tabular-nums;
  text-align: end;
}

@media (prefers-color-scheme: dark) {
  .element {
    color: #111;
    border-color: rgba(255, 255, 255, 0.2);
  }
}
