body:has(.wow-page) { min-width: 0; overflow-x: clip; }
.wow-page [hidden] { display: none !important; }
.wow-page .tool-shell > * { min-width: 0; }
.wow-page .result-number { font-size: clamp(2.55rem, 5vw, 4.1rem) !important; }
.wow-page .wow-summary { display: block; }
.wow-page .calc-panel .field-help { margin: .4rem 0 0; }
.wow-panel-actions, .wow-trees { display: flex; flex-wrap: wrap; gap: .65rem; }
.wow-panel-actions { margin-block: 1rem 1.4rem; }
.wow-panel-actions button { min-width: 0; white-space: normal; }
.wow-panel-actions .primary-btn { flex: 1 1 14rem; }
.wow-tree-label { font-weight: 750; margin: 0 0 .5rem; }
.wow-trees { margin-bottom: 1.1rem; }
.wow-tree, .wow-rank {
  color: inherit;
  background: transparent;
  border: 1px solid #b48a466b;
  border-radius: .65rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.wow-tree { flex: 1 1 8rem; padding: .6rem .65rem; }
.wow-tree[aria-pressed=true] { color: #f6c75f; background: #d9a93d26; border-color: #d9a93d; }
.wow-tier { margin: .75rem 0 0; }
.wow-tier h3 {
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .7rem;
  margin: 0 0 .4rem;
}
.wow-tier h3 span { font-size: .8rem; text-transform: none; letter-spacing: 0; opacity: .78; }
.wow-talent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  padding: .4rem .6rem;
  margin-bottom: .25rem;
  min-width: 0;
  border: 1px solid #80808035;
  border-radius: .65rem;
}
.wow-talent[data-invested=true] { background: #d9a93d14; border-color: #d9a93d65; }
.wow-talent-info { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.wow-talent-info small { display: block; margin-top: .22rem; }
.wow-ranks { display: flex; align-items: center; gap: .32rem; flex: none; }
.wow-rank { inline-size: 2.55rem; block-size: 2.55rem; font-size: 1.2rem; }
.wow-rank[aria-disabled=true] { opacity: .55; cursor: default; }
.wow-rank-count { min-width: 3ch; white-space: nowrap; text-align: center; font-variant-numeric: tabular-nums; }
.wow-page :is(button,select,textarea,a):focus-visible { outline: 2px solid #f3bd46; outline-offset: 3px; }
.wow-box, .wow-equation { padding: clamp(.8rem,2vw,1.2rem); border: 1px solid #b48a4670; border-radius: 1rem; background: #b48a4610; }
.wow-box { margin: 1rem 0 0; }
.wow-box :is(h3,figcaption) { font-size: 1.18rem; font-weight: 800; margin: 0 0 .5rem; }
.wow-chart .field-help { margin: 0 0 .75rem; }
.wow-bar + .wow-bar { margin-top: .7rem; }
.wow-bar-label { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem .75rem; margin-bottom: .28rem; }
.wow-bar-track { block-size: .65rem; border-radius: .5rem; background: #80808037; overflow: hidden; }
.wow-bar-track span { display: block; height: 100%; border-radius: inherit; background: var(--bar, #d9a93d); }
.wow-bar:nth-child(2) { --bar: #4f9ccc; }
.wow-bar:nth-child(3) { --bar: #ab86db; }
.wow-bar:nth-child(4) { --bar: #51a88d; }
.wow-steps, .wow-selected { padding-inline-start: 1.25rem; margin: 0; }
.wow-steps li + li, .wow-selected li + li { margin-top: .45rem; }
.wow-page .result-actions { margin: 1rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.wow-page .result-actions button { min-width: 0; white-space: normal; }
.wow-manual-copy label { display: block; }
.wow-manual-copy textarea { width: 100%; background: transparent; color: inherit; border: 1px solid currentColor; border-radius: .5rem; padding: .55rem; }
.wow-page ol li + li { margin-top: .45rem; }
.wow-page .article details { margin-block: .75rem; padding: .75rem; border: 1px solid #b48a4670; border-radius: .65rem; }
.wow-page .article summary { cursor: pointer; font-weight: 700; }
.wow-page .article details p { margin: .55rem 0 0; }
.wow-page .wow-class-guide, .wow-page .related-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: .75rem;
}
.wow-class-guide section, .wow-page .related-card { padding: .8rem; border: 1px solid #80808045; border-radius: .8rem; }
.wow-class-guide h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.wow-class-guide p { margin: 0; }
.wow-page .related-card { display: grid; gap: .35rem; }
html[data-theme=light] .wow-tree[aria-pressed=true] { color: #64450b; }
html[data-theme=light] .wow-page :is(button,select,textarea,a):focus-visible { outline-color: #8b5b06; }
@media(max-width: 540px) {
  .wow-page .field-grid { grid-template-columns: 1fr; }
  .wow-trees { gap: .4rem; }
  .wow-tree { flex-basis: 6rem; padding-inline: .3rem; }
  .wow-talent { padding-inline: .45rem; }
}
@media print {
  body:has(.wow-page) > :not(.wow-page),
  .wow-page :is(.hero,.breadcrumbs,.calc-panel,.content-layout,.result-actions,.result-action-status,.wow-manual-copy) { display: none !important; }
  html:has(.wow-page), body:has(.wow-page), .wow-page, .wow-page :is(.wrap,.tool-shell,.result-panel,.result-content,.wow-box,.result-note) {
    background: #fff !important; color: #111 !important; box-shadow: none !important; border-color: #aaa !important;
  }
  .wow-page .tool-shell { display: block !important; margin: 0 !important; padding: 0 !important; }
  .wow-page :is(.tool-shell,.result-panel,.result-content)::before, .wow-page :is(.tool-shell,.result-panel)::after { display: none !important; }
  .wow-page .result-number { font-size: 2rem !important; color: #111 !important; -webkit-text-fill-color: #111 !important; }
  .wow-page :is(.panel-kicker,.field-help) { color: #111 !important; }
  .wow-page .wow-chart { break-inside: avoid; print-color-adjust: exact; }
  .wow-page .wow-selected li { break-inside: avoid; }
  .wow-page .result-content::before { display: block !important; content: 'WoW Forever Talent Calculator'; font-size: 1.4rem; font-weight: 750; }
}
@media (min-width: 901px) {
  #wow-talents { max-height: 34rem; overflow-y: auto; padding: 0 .35rem .25rem .2rem; scrollbar-width: thin; scrollbar-color: #b48a46 #80808020; }
}
.wow-page .wow-mobile-result { display: none; }
@media (max-width: 900px) {
  .wow-page .wow-mobile-result { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem .9rem; margin-bottom: 1rem; }
  .wow-mobile-result a { text-decoration: underline; text-underline-offset: .2em; }
  #wow-summary { scroll-margin-top: 6rem; }
}
