/* periodic-table-trends — scoped styles */
.ptt-card {
  position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2;
  width: min(300px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow-y: auto;
  padding: 12px; border-radius: 14px; font-size: 13px; line-height: 1.35;
  background: rgba(14, 19, 40, .86); color: #e8ebf7; border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ptt-card[hidden], .ptt-tip[hidden] { display: none; }
.ptt-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ptt-tile {
  width: 62px; height: 62px; border-radius: 10px; flex: none; color: #141a2e;
  display: grid; grid-template-rows: auto 1fr auto; padding: 4px 6px; box-sizing: border-box;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
}
.ptt-tile small { font-size: 11px; font-weight: 700; line-height: 1; }
.ptt-tile b { font-size: 24px; line-height: 1; align-self: center; text-align: center; }
.ptt-tile span { font-size: 9.5px; text-align: center; line-height: 1; }
.ptt-card-title { flex: 1; min-width: 0; }
.ptt-card-title h3 { margin: 0; font-size: 18px; line-height: 1.15; color: #fff; overflow-wrap: anywhere; }
.ptt-card-title p { margin: 2px 0 0; font-size: 12.5px; color: #b9c0dc; }
.ptt-close {
  align-self: flex-start; width: 28px; height: 28px; border-radius: 8px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .1); color: #fff; font-size: 18px; line-height: 1;
}
.ptt-close:hover { background: rgba(255, 255, 255, .2); }
.ptt-card table { width: 100%; border-collapse: collapse; }
.ptt-card th { text-align: start; font-weight: 500; color: #aab2d3; padding: 3px 8px 3px 0; vertical-align: top; }
.ptt-card td { text-align: end; font-weight: 600; padding: 3px 0; font-variant-numeric: tabular-nums; }
.ptt-card td sup { font-size: 9px; }
.ptt-card td small { color: #aab2d3; font-weight: 500; }
.ptt-props { margin-top: 6px; border-top: 1px solid rgba(255, 255, 255, .14); }
.ptt-props tr:first-child th, .ptt-props tr:first-child td { padding-top: 7px; }
.ptt-props tr.cur th, .ptt-props tr.cur td { color: #ffd27a; }

.ptt-tip {
  position: absolute; z-index: 3; pointer-events: none !important; white-space: nowrap;
  padding: 4px 9px; border-radius: 7px; font-size: 12.5px; font-weight: 600;
  background: rgba(10, 14, 30, .85); color: #fff;
}
.label-3d.ptt-axis { background: none; color: #8f98c2; font-size: 11px; padding: 0; }
.label-3d.ptt-arrow-label { background: rgba(10, 14, 30, .6); color: #ffe3b0; font-size: 12px; }
.label-3d.ptt-quiz-label { background: #ffd27a; color: #141a2e; font-size: 13px; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }

.ptt-legend .ptt-bar { height: 12px; border-radius: 6px; direction: ltr; }
.ptt-legend .ptt-bar-labels { display: flex; justify-content: space-between; font-size: 12px; font-family: var(--mono); color: var(--ink-2); margin: 4px 0 6px; direction: ltr; }
.ctl-note.ptt-q { font-size: 14px; font-weight: 600; color: var(--ink); }
.sim-panel .btn.ptt-right { background: var(--ok); border-color: var(--ok); color: #fff; }
.sim-panel .btn.ptt-wrong { background: var(--bad); border-color: var(--bad); color: #fff; }
.sim-panel .btn:disabled { cursor: default; }

@media (max-width: 520px) {
  .ptt-card { width: calc(100% - 24px); font-size: 12.5px; }
}
