/* Interactive Periodic Table */
.pt-tabs { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .7rem; }
.pt-tabs button { display: flex; align-items: center; gap: .4rem; border: 2px solid var(--pmcq-line, #d7e2e8); background: #fff; color: var(--bs-primary); border-radius: 12px; padding: .45rem .85rem; font-weight: 700; cursor: pointer; }
.pt-tabs button.on { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.pt-bar { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; margin-bottom: .7rem; }
.pt-search { position: relative; flex: 1 1 220px; max-width: 340px; margin: 0; }
.pt-search i { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.pt-search input { padding-left: 2rem; }
.pt-colour { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: .85rem; font-weight: 700; color: #475569; }
.pt-colour select { width: auto; min-width: 12rem; }

.pt-left { min-width: 0; }
.pt-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.pt-scroll { overflow-x: auto; padding-bottom: .3rem; background: #fff; border: 1px solid var(--pmcq-line, #d7e2e8); border-radius: 14px; padding: .6rem; }
.pt-table { display: grid; grid-template-columns: 1.4rem repeat(18, minmax(46px, 1fr)); gap: 3px; min-width: 900px; }
.pt-el { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1.5px solid rgba(15, 23, 42, .18); border-radius: 6px; padding: 1px 0 2px; min-height: 52px; cursor: pointer; color: #0f172a; line-height: 1.05; transition: opacity .15s, transform .1s; overflow: hidden; }
.pt-el .n { position: absolute; left: 3px; top: 1px; font-size: 9.5px; color: #334155; }
.pt-el .s { font-size: 17px; font-weight: 800; margin-top: 6px; }
.pt-el .nm { font-size: 8.5px; max-width: 100%; padding: 0 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1e293b; }
.pt-el:hover, .pt-el:focus-visible { transform: scale(1.12); z-index: 3; outline: none; border-color: var(--bs-primary); box-shadow: 0 3px 10px rgba(15, 23, 42, .25); }
.pt-el.sel { border-color: #0b3d5c; box-shadow: 0 0 0 3px rgba(11, 61, 92, .35); z-index: 2; }
.pt-el.dim { opacity: .18; }
.pt-el.wrong { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .5); }
.pt-el.right { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .55); }
.pt-gh, .pt-ph { border: 0; background: transparent; font-size: .74rem; font-weight: 700; color: #64748b; border-radius: 5px; padding: 0; cursor: pointer; }
.pt-gh:hover, .pt-ph:hover, .pt-gh[aria-pressed="true"], .pt-ph[aria-pressed="true"] { background: #fde68a; color: #0b3d5c; }
.pt-ph.note { cursor: default; font-size: .66rem; }
.pt-ph.note:hover { background: transparent; color: #64748b; }
.pt-ph3 { display: flex; align-items: center; justify-content: center; font-size: .66rem; color: #64748b; border: 1.5px dashed #cbd5e1; border-radius: 6px; }
.pt-gap { height: .4rem; }
.pt-trend { display: flex; flex-direction: column; justify-content: center; gap: .15rem; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: .4rem .7rem; font-size: .88rem; color: #0b3d5c; pointer-events: none; }
.pt-trend small { color: #64748b; }

.pt-legend { display: flex; flex-wrap: wrap; gap: .35rem .5rem; margin-top: .6rem; align-items: center; }
.pt-lg { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--pmcq-line, #d7e2e8); background: #fff; border-radius: 999px; padding: .15rem .65rem .15rem .4rem; font-size: .8rem; cursor: pointer; }
.pt-lg.on { border-color: var(--bs-primary); background: #e6f0f5; font-weight: 700; }
.pt-chip { display: inline-block; width: .9rem; height: .9rem; border-radius: 4px; border: 1px solid rgba(15, 23, 42, .25); vertical-align: -.15rem; }
.pt-grad { display: inline-block; width: 9rem; height: .7rem; border-radius: 4px; background: linear-gradient(90deg, rgb(254,243,199), rgb(230,83,49)); border: 1px solid rgba(15, 23, 42, .2); }

.pt-side { padding: .9rem; position: sticky; top: .6rem; max-height: calc(100vh - 1.2rem); overflow-y: auto; }
.pt-big { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 14px; border: 2px solid rgba(15, 23, 42, .2); padding: .6rem; min-height: 8.5rem; }
.pt-big .z { position: absolute; left: .7rem; top: .45rem; font-weight: 700; font-size: 1.05rem; }
.pt-big .m { position: absolute; right: .7rem; top: .45rem; font-size: .9rem; color: #334155; }
.pt-big .sy { font-size: 3.4rem; font-weight: 800; line-height: 1; }
.pt-big .nm { font-size: 1.1rem; font-weight: 700; }
.pt-nav { display: flex; align-items: center; justify-content: space-between; margin: .5rem 0; }
.pt-fact { background: #f1f6f8; border-radius: 10px; padding: .5rem .7rem; font-size: .9rem; margin-bottom: .5rem; }
.pt-bohr { display: block; width: 100%; max-width: 260px; margin: 0 auto .4rem; }
.pt-facts th { width: 38%; font-weight: 600; color: #475569; font-size: .84rem; }
.pt-facts td { font-size: .86rem; }
.pt-mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .95rem; }
.pt-cfg { border-top: 1px solid var(--pmcq-line, #d7e2e8); padding-top: .6rem; }
.pt-info { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: .55rem .75rem; margin-bottom: .6rem; }
.pt-quiz { padding: .2rem; }

@media (max-width: 991px) {
  .pt-main { grid-template-columns: minmax(0, 1fr); }
  .pt-side { position: static; max-height: none; }
  .pt-main.quiz .pt-side { order: -1; position: sticky; top: 0; z-index: 8; box-shadow: 0 4px 12px rgba(15, 23, 42, .18); padding: .6rem .8rem; }
  .pt-colour select { min-width: 9rem; }
}
