/**
 * Landing /tabela-periodica — ferramenta.
 * 10 classes (padrão escolar/CRQ) + navy (contraste ≥ WCAG AA).
 * Sem @import, sem CDN, sem scale no hover.
 */
.az-main.az-main--pt {
  --pt-ink: var(--navy);
  --pt-alcalino: #fecdd3;
  --pt-alcalino-terroso: #fdba74;
  --pt-transicao: #fed7aa;
  --pt-pos-transicao: #a5f3fc;
  --pt-semimetal: #5eead4;
  --pt-nao-metal: #d1d5db;
  --pt-halogenio: #fde68a;
  --pt-gas-nobre: #d8b4fe;
  --pt-desconhecidas: #d1d5db;
  --pt-lantanideo: #f9a8d4;
  --pt-actinideo: #fca5a5;
  --pt-cell-min: 52px;
  --pt-gap: 3px;
  --pt-axis: 1.15rem;
  --pt-col: min(100% - 2rem, 1400px);
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

body.az-agency-body:has(.az-pt-page) {
  background: #fff;
}

.az-pt-page {
  max-width: 100%;
  background: #fff;
}
.az-pt-page .az-breadcrumb { margin-bottom: .5rem; }

.az-pt-shell {
  width: var(--pt-col);
  margin-inline: auto;
  padding: .85rem 0 2.5rem;
}

.az-pt-tool {
  margin: 0 0 2rem;
  padding: .75rem;
  background: #fff;
  border: 1px solid var(--line-lite);
  border-radius: 12px;
}

.az-pt-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: .28rem .55rem .3rem;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-2);
  z-index: 1;
}

.az-pt-page .az-pt-gap__title {
  flex: 0 0 auto;
  font-size: 1.28rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.03em;
  margin: 0 0 .12rem;
  color: var(--navy);
}

.az-pt-panel[data-selected]:not([data-selected=""]) {
  justify-content: flex-start;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-lite);
}

.az-pt-panel[data-selected]:not([data-selected=""]) .az-pt-gap__title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.az-pt-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  margin: 0;
}
.az-pt-card[hidden],
.az-pt-idle[hidden],
.az-pt-panel__lead[hidden] {
  display: none !important;
}

.az-pt-idle {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.az-prose.az-pt-page .az-pt-card__banner {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 2.25rem;
  margin: 0;
  padding: .5rem .75rem;
  border-radius: 5px 5px 0 0;
  background: #b42318;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.az-pt-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.az-pt-card__cols {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .3rem .4rem;
  align-items: stretch;
  padding: .3rem .35rem .2rem;
}

.az-pt-card__tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .08rem;
  min-width: 5.1rem;
  padding: .3rem .4rem .25rem;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--pt-ink) 16%, transparent);
}

.az-pt-card__sym {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1;
  color: var(--navy);
}
.az-pt-card__tile-name {
  font-size: .62rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy);
  text-align: center;
}

.az-pt-card__table {
  display: grid;
  margin: 0;
  min-width: 0;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}
.az-pt-card__table > div {
  display: grid;
  grid-template-columns: 7.6rem minmax(0, 1fr);
  gap: .3rem;
  align-items: center;
  padding: .08rem .45rem;
  border-bottom: 1px solid var(--line-lite);
  font-size: .64rem;
  line-height: 1.2;
}
.az-pt-card__table > div:last-child { border-bottom: 0; }
.az-pt-card__table dt {
  margin: 0;
  color: var(--ink-3);
  font-weight: 500;
  white-space: normal;
}
.az-pt-card__table dd {
  margin: 0;
  color: var(--navy);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.az-pt-panel__lead {
  margin: 0 0 .4rem;
  font-size: .78rem;
  line-height: 1.35;
}

.az-pt-idle .az-pt-panel__lead:last-of-type {
  margin-bottom: 1.15rem;
}

.az-pt-hint {
  display: none;
  margin: 0 0 .5rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink-3);
}
.az-pt-hint.is-needed { display: block; }

.az-pt-scroll {
  margin-top: 0;
  overscroll-behavior-x: contain;
}

.az-pt-main,
.az-pt-fblock {
  display: grid;
  width: 100%;
  grid-template-columns: var(--pt-axis) repeat(18, minmax(var(--pt-cell-min), 1fr));
  gap: var(--pt-gap);
}

.az-pt-main {
  grid-template-rows: var(--pt-axis) repeat(7, var(--pt-cell-min));
}

.az-pt-fblock {
  margin-top: .28rem;
  grid-template-rows: repeat(2, var(--pt-cell-min));
}

.az-pt-fblock-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  padding: 0 .4rem 0 0;
  font-size: .68rem;
  line-height: 1.2;
  text-align: right;
  color: var(--ink-3);
  user-select: none;
}

.az-pt-axis {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 500;
  color: var(--ink-3);
  user-select: none;
}

.az-pt-cell {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  align-content: stretch;
  justify-items: center;
  row-gap: 0;
  min-height: var(--pt-cell-min);
  min-width: 0;
  margin: 0;
  padding: .55rem .08rem .1rem;
  border: 1px solid color-mix(in srgb, var(--pt-ink) 12%, transparent);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--pt-ink);
  font-family: var(--font-sans);
  line-height: 1.05;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.az-pt-cell__z {
  position: absolute;
  top: 2px;
  left: 4px;
  font-family: var(--font-mono);
  font-size: .52rem;
  font-weight: 500;
  line-height: 1;
  opacity: .72;
}

.az-pt-cell__sym {
  align-self: center;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
}

.az-pt-cell__name {
  justify-self: stretch;
  min-width: 0;
  font-size: .52rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.az-pt-cell--alcalino { background: var(--pt-alcalino); }
.az-pt-cell--alcalino_terroso { background: var(--pt-alcalino-terroso); }
.az-pt-cell--transicao { background: var(--pt-transicao); }
.az-pt-cell--pos_transicao { background: var(--pt-pos-transicao); }
.az-pt-cell--semimetal { background: var(--pt-semimetal); }
.az-pt-cell--nao_metal_poliatomico,
.az-pt-cell--nao_metal_diatomico { background: var(--pt-nao-metal); }
.az-pt-cell--halogenio { background: var(--pt-halogenio); }
.az-pt-cell--gas_nobre { background: var(--pt-gas-nobre); }
.az-pt-cell--propriedades_desconhecidas { background: var(--pt-desconhecidas); }
.az-pt-cell--lantanideo { background: var(--pt-lantanideo); }
.az-pt-cell--actinideo { background: var(--pt-actinideo); }

.az-pt-cell:hover,
.az-pt-tool--filter .az-pt-cell.is-legend-match,
.az-pt-tool--filter .az-pt-ph.is-legend-match {
  outline: 3px solid var(--navy);
  outline-offset: 1px;
  z-index: 1;
}

.az-pt-cell:focus-visible,
.az-pt-cell[aria-pressed='true'] {
  outline: 3px solid var(--navy);
  outline-offset: 1px;
  z-index: 2;
}

.az-pt-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--pt-cell-min);
  padding: .1rem;
  border: 1px dashed var(--line-lite);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: .55rem;
  text-align: center;
  line-height: 1.15;
}

.az-prose.az-pt-page .az-pt-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: min-content;
  gap: .1rem .45rem;
  list-style: none;
  flex: 1 1 auto;
  align-content: start;
  margin: 0;
  padding: 0;
}

.az-pt-legend__item {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  margin: 0;
  min-width: 0;
  padding: .1rem .2rem .1rem .08rem;
  border-radius: 4px;
  font-size: .72rem;
  line-height: 1.2;
  color: var(--ink-2);
  cursor: pointer;
}

.az-pt-legend__item > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.az-pt-legend__item:hover,
.az-pt-legend__item.is-active {
  color: var(--navy);
  background: #fff;
}

.az-pt-swatch {
  display: inline-block;
  width: .85rem;
  height: .85rem;
  border-radius: 3px;
  border: 1px solid color-mix(in srgb, var(--pt-ink) 16%, transparent);
  flex: 0 0 auto;
}

.az-pt-article,
.az-pt-cta,
.az-pt-page .az-faq {
  box-sizing: border-box;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 4.5rem max(3rem, calc((100% - var(--az-max, 1100px)) / 2));
  background: #fff;
}

.az-pt-band {
  background: var(--surface-2);
  border-block: 1px solid var(--line-lite);
}

.az-pt-band .az-pt-table-wrap table {
  background: #fff;
}

.az-pt-article h2,
#faq-heading,
#ferramenta,
#cta,
#cai-no-enem,
#como-ler,
#tendencias,
#usos,
#historia,
#fontes {
  scroll-margin-top: 5.5rem;
}

.az-pt-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
}

.az-pt-table-wrap table {
  margin: 0;
  min-width: 28rem;
}

.az-pt-article caption {
  caption-side: top;
  text-align: left;
  font-size: .82rem;
  color: var(--ink-3);
  padding: 0 0 .45rem;
}

.az-pt-article ol > li,
.az-pt-article ul > li {
  margin-bottom: 1.05rem;
}

.az-pt-article ol > li > p:first-child strong,
.az-pt-article ul > li > p:first-child strong {
  color: var(--pt-ink);
}

.az-pt-article ol > li p,
.az-pt-article ul > li p {
  margin: .4rem 0 0;
}

.az-pt-article ol > li p:first-child,
.az-pt-article ul > li p:first-child {
  margin-top: 0;
}

.az-pt-cta {
  display: block;
  border-radius: 0;
}
.az-pt-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}
.az-pt-cta__secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--navy);
  color: var(--navy) !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
}
.az-pt-cta__secondary:hover {
  background: var(--navy);
  color: #fff !important;
}

@media (max-width: 1099px) {
  .az-pt-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 1.25rem), transparent);
  }
  .az-pt-main,
  .az-pt-fblock { min-width: 980px; }
}

@media (max-width: 799px) {
  .az-pt-hint { display: block; }
  .az-main.az-main--pt {
    --pt-cell-min: 50px;
    --pt-gap: 2px;
  }
  .az-pt-shell { padding: 1rem 0 2rem; }
  .az-pt-article,
  .az-pt-cta,
  .az-pt-page .az-faq {
    padding: 3rem 1.5rem;
  }
  .az-pt-cta__actions { flex-direction: column; align-items: stretch; }
  .az-pt-cta__secondary,
  .az-pt-cta .az-article-cta__btn { width: 100%; }
}

@media (min-width: 1100px) {
  .az-main.az-main--pt { --pt-cell-min: 59px; }
  .az-pt-scroll { overflow-x: visible; }
  .az-pt-main,
  .az-pt-fblock { min-width: 0; }
  .az-pt-cell__z { font-size: .52rem; }
  .az-pt-cell__name { font-size: .58rem; }
  .az-pt-cell__sym { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .az-pt-cell,
  .az-pt-cta__secondary {
    transition: none !important;
  }
  .az-pt-cell:hover { outline-width: 2px; }
}

@media print {
  .az-header,
  .az-footer,
  .az-pt-cta,
  .az-faq,
  .az-skip,
  .az-pt-hint { display: none !important; }
  .az-pt-tool { border: none; padding: 0; }
  .az-pt-scroll {
    overflow: visible;
    mask-image: none;
  }
  .az-pt-main,
  .az-pt-fblock { min-width: 0; }
  .az-pt-cell { break-inside: avoid; }
  .az-pt-tool--filter .az-pt-cell,
  .az-pt-tool--filter .az-pt-ph { opacity: 1; }
  .az-pt-tool--filter .az-pt-cell.is-legend-match { outline: none; }
}
