:is(.aion2-guide, .aion-classic-guide) .guide-section {
  padding: clamp(14px, 3vw, 24px);
  overflow-wrap: anywhere;
}

.aion-classic-guide :is(.guide-section h2, .guide-section h3, .guide-topic-heading h2) {
  text-wrap: balance;
}

.aion-classic-guide [aria-labelledby="quest-list"] .character-table td:nth-child(2) {
  white-space: nowrap;
}

.aion2-guide [aria-labelledby="daevanion"] .character-table :is(th, td):nth-child(-n+2) {
  white-space: nowrap;
}

.guide-topic-heading h2,
.guide-section h2, .guide-section h3, .guide-section h4 {
  color: var(--accent);
  margin: 0 0 .6rem;
}

.guide-section h4 { margin-top: 1.35rem; }
.guide-section p, .guide-section li { line-height: 1.65; }
.guide-section ul, .guide-section ol { padding-inline-start: 1.5em; }
.guide-section li + li { margin-top: .45em; }
.guide-toc, .guide-topic-heading h2, .guide-section :is(h2, h3) { scroll-margin-top: 1rem; }

:is(.aion2-guide, .aion-classic-guide) .guide-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.guide-toc > ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: .4rem 1rem;
}

.guide-toc > ul > li { margin: 0; }
.guide-toc-topic {
  display: block;
  color: var(--accent);
  font-weight: 700;
  padding: .3rem .55rem 0;
}

.guide-toc a, .guide-topic-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .2rem .55rem;
}

.guide-topic-heading { padding: clamp(14px, 3vw, 24px); }
.guide-topic-heading p { margin: 0; line-height: 1.65; }
.guide-topic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 .5rem;
  margin: 0 0 1rem;
}

@media (max-width: 600px) {
  .guide-toc ul ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .15rem .4rem;
  }

  .guide-toc ul ul a { font-size: .9rem; }
}

.guide-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}

.guide-controls > label:first-child { flex: 1 1 18rem; }
.guide-controls .hp-search-control > input:placeholder-shown { padding-right: 12px; }
.guide-controls input,
.guide-controls select,
.guide-controls button { min-height: 44px; }
:is(.aion2-guide, .aion-classic-guide) .guide-controls .character-filter-select {
  width: auto;
  max-inline-size: 100%;
  padding-inline-end: 32px;
}
.guide-controls button { white-space: nowrap; }

:is(.aion2-guide, .aion-classic-guide) .guide-section .character-table { table-layout: auto; }

:is(.aion2-guide, .aion-classic-guide) .guide-section .character-table th,
:is(.aion2-guide, .aion-classic-guide) .guide-section .character-table td {
  width: auto;
  text-align: left;
}

.guide-section .character-table tbody[data-static-item] > tr:first-child > td {
  border-bottom: 0;
}

.guide-section .character-table tbody[data-static-item]:not([hidden]) ~ tbody[data-static-item] > tr:first-child > td,
.guide-section .character-table tr[data-static-detail] > td {
  border-top: 1px solid #f7e3ed;
}

:is(.aion2-guide, .aion-classic-guide) .guide-section .character-sort-button > span:first-child {
  min-width: 3em;
  text-wrap: balance;
}

.aion2-guide [aria-labelledby="daevanion"] .character-sort-button > span:first-child {
  white-space: nowrap;
}

:is(.aion2-guide, .aion-classic-guide) .character-table td:first-child,
:is(.aion2-guide, .aion-classic-guide) .guide-card .character-card-name { font-weight: 700; }

:is(.aion2-guide, .aion-classic-guide) .guide-card {
  display: grid;
  gap: .35rem;
  min-width: 0;
  padding: .7rem .85rem;
  overflow-wrap: anywhere;
}

:is(.aion2-guide, .aion-classic-guide) .guide-cell { display: block; }
:is(.aion2-guide, .aion-classic-guide) .guide-cell::before {
  content: attr(data-label) " ";
  color: var(--text);
  font-size: .82em;
  font-weight: 700;
  margin-inline-end: .25rem;
}


:is(.aion2-guide, .aion-classic-guide) .guide-mobile-sort { margin-bottom: .45rem; }

:is(.aion2-guide, .aion-classic-guide) .guide-detail {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  margin: 0;
}

:is(.aion2-guide, .aion-classic-guide) .guide-detail .character-detail-item {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 4px;
}

:is(.aion2-guide, .aion-classic-guide) .guide-detail dt { font-weight: 700; }
:is(.aion2-guide, .aion-classic-guide) .guide-detail dd { margin: 0; font-weight: 400; }
