/* Shared readability fixes for inherited SMF and guide content. */
body.v4-scope.v3-scope .v3-content {
  color: var(--forest-text);
  line-height: 1.65;
}
body.v4-scope.v3-scope .v3-content p,
body.v4-scope.v3-scope .v3-content li,
body.v4-scope.v3-scope .v3-content td,
body.v4-scope.v3-scope .v3-content dd { color: inherit; }
body.v4-scope.v3-scope .v3-content .article_subject { color: var(--forest-gold) !important; }
body.v4-scope.v3-scope .v3-content a,
body.v4-scope.v3-scope .v3-content a:visited { color: var(--forest-gold); }
body.v4-scope.v3-scope .v3-content a.v4-button { color: #28200d; }
body.v4-scope.v3-scope .v3-content a.v4-button--secondary { color: var(--forest-text); }
body.v4-scope.v3-scope .v3-content .catbg,
body.v4-scope.v3-scope .v3-content .cat_bar,
body.v4-scope.v3-scope .v3-content .title_bar {
  height: auto;
  min-height: 0;
  padding: 10px 14px;
  border: 1px solid var(--forest-border);
  border-radius: 3px;
  background: var(--forest-raised) !important;
  color: var(--forest-text) !important;
  box-shadow: none;
  text-shadow: none;
  white-space: normal;
}
body.v4-scope.v3-scope .v3-content .catbg a,
body.v4-scope.v3-scope .v3-content .catbg a:visited { color: var(--forest-gold) !important; }
body.v4-scope.v3-scope .v3-content .windowbg,
body.v4-scope.v3-scope .v3-content .windowbg2,
body.v4-scope.v3-scope .v3-content .information,
body.v4-scope.v3-scope .v3-content .tborder {
  border-color: var(--forest-border);
  background-color: var(--forest-surface);
  color: var(--forest-text);
}
body.v4-scope.v3-scope .v3-content .error,
body.v4-scope.v3-scope .v3-content .errorbox { color: var(--forest-danger); }
body.v4-scope.v3-scope .v3-content .success,
body.v4-scope.v3-scope .v3-content .successbox { color: var(--forest-success); }

/* Legacy account forms carry inline light panels and tightly packed fields. */
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form {
  color: var(--forest-text);
}
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form .login,
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form #registration {
  margin: 0 auto;
  padding: clamp(14px, 3vw, 28px);
  border: 1px solid var(--forest-border) !important;
  border-radius: 4px;
  background: var(--forest-surface) !important;
  color: var(--forest-text);
  box-shadow: none;
}
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form .login { width: min(100%, 480px); }
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form #registration { width: min(100%, 760px); }
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form .roundframe,
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form .roundframe[style] {
  padding: 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--forest-text) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form .catbg {
  display: block !important;
  margin: 0 0 12px;
  color: var(--forest-text) !important;
}
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form label,
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form dt {
  color: var(--forest-text);
}
body.v4-scope.v3-scope.v3-route-reminder .v3-content form .login dt,
body.v4-scope.v3-scope.v3-route-reminder .v3-content form .login dd { text-align: left; }
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form select,
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form textarea,
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form button,
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form input[type="submit"] {
  min-height: 44px;
}
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form input[type="checkbox"],
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form input[type="radio"] { min-width: 20px; min-height: 20px; }
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form img { max-width: 100%; height: auto; }
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form .register_form fieldset,
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form fieldset.content { max-width: 480px; margin-inline: auto; }
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form .register_form dt,
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form .register_form dd,
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form .login dt,
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form .login dd { float: none; display: block; width: 100%; margin: 0 0 7px; }
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content .v4-auth-card {
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 20px;
  border: 1px solid var(--forest-border);
  border-radius: 4px;
  background: var(--forest-surface);
  color: var(--forest-text);
}
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content .v4-auth-field { display: grid; gap: 6px; margin: 0 0 14px; }
body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content .v4-auth-actions { display: grid; justify-items: start; gap: 10px; margin-top: 18px; }
body.v4-scope.v3-scope .v4-auth-actions input[type="submit"] { width: 100%; padding: 10px 18px; }
body.v4-scope.v3-scope .v4-auth-heading { margin-bottom: 20px; }
body.v4-scope.v3-scope .v4-auth-heading h2 { margin: 0 0 12px; }
@media (max-width: 480px) {
  body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form select,
  body.v4-scope.v3-scope:is(.v3-route-login, .v3-route-register, .v3-route-reminder, .v3-route-helpdesk, .v3-route-personal, .v3-route-wheel) .v3-content form textarea { width: 100%; }
}

/* Forum link contrast and compact topic-list layout on narrow screens. */
body.v4-scope.v3-route-forum #messageindex .table_grid thead tr.catbg { background: var(--forest-raised) !important; }
body.v4-scope.v3-route-forum #messageindex .table_grid,
body.v4-scope.v3-route-forum #messageindex .table_grid tbody tr { background: var(--forest-surface); }
body.v4-scope.v3-route-forum .table_frame td.info a.subject,
body.v4-scope.v3-route-forum #forumposts .poster h4 a,
body.v4-scope.v3-route-forum #forumposts .poster h4 a * { color: var(--forest-gold) !important; }
body.v4-scope.v3-route-forum #forumposts .bbc_color[style*="color: teal"],
body.v4-scope.v3-route-forum #forumposts .bbc_color[style*="color: #008080"] { color: #8cdbc9 !important; }
@media (max-width: 700px) {
  body.v4-scope.v3-route-forum #messageindex > .table_grid,
  body.v4-scope.v3-route-forum .tborder > .table_frame > .table_list { display: block; width: 100%; min-width: 0; }
  body.v4-scope.v3-route-forum #messageindex .table_grid > tbody,
  body.v4-scope.v3-route-forum .table_frame .table_list > tbody { display: block; }
  body.v4-scope.v3-route-forum #messageindex .table_grid > thead { display: block; }
  body.v4-scope.v3-route-forum #messageindex .table_grid > thead > tr { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 12px; }
  body.v4-scope.v3-route-forum #messageindex .table_grid > thead th { display: block; width: auto; padding: 0; }
  body.v4-scope.v3-route-forum #messageindex .table_grid > thead th:first-child { display: none; }
  body.v4-scope.v3-route-forum #messageindex .table_grid > tbody > tr,
  body.v4-scope.v3-route-forum .table_frame .table_list > tbody > tr { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 0 6px; padding: 12px; }
  body.v4-scope.v3-route-forum #messageindex .table_grid > tbody > tr > td,
  body.v4-scope.v3-route-forum .table_frame .table_list > tbody > tr > td { width: auto; min-width: 0; border: 0; padding: 4px 0; overflow-wrap: anywhere; }
  body.v4-scope.v3-route-forum #messageindex td.icon1,
  body.v4-scope.v3-route-forum .table_frame td.icon { grid-column: 1; grid-row: 1; }
  body.v4-scope.v3-route-forum .table_frame td.icon img { max-width: 24px; height: auto; }
  body.v4-scope.v3-route-forum #messageindex td.subject,
  body.v4-scope.v3-route-forum .table_frame td.info { grid-column: 2; grid-row: 1; }
  body.v4-scope.v3-route-forum #messageindex td.stats,
  body.v4-scope.v3-route-forum #messageindex td.lastpost,
  body.v4-scope.v3-route-forum .table_frame td.stats,
  body.v4-scope.v3-route-forum .table_frame td.lastpost { display: block; grid-column: 2; text-align: left; font-size: 12px; }
}

/* Accessible replacements for the old illustrated guide menu and Flash player. */
body.v4-scope.v3-route-page .v4-guide-menu { padding: 18px; border: 1px solid var(--forest-border); border-radius: 4px; background: var(--forest-surface); }
body.v4-scope.v3-route-page .v4-guide-menu h2 { margin: 0 0 12px; color: var(--forest-gold); }
body.v4-scope.v3-route-page .v4-guide-menu ul { display: grid; gap: 6px; padding: 0; margin: 0 0 14px; list-style: none; }
body.v4-scope.v3-route-page .v4-guide-menu li { margin: 0; }
body.v4-scope.v3-route-page .v4-guide-menu a { display: inline-flex; align-items: center; min-height: 44px; }
body.v4-scope.v3-route-page .article_inner > table:has(.v4-guide-menu),
body.v4-scope.v3-route-page .article_inner > table:has(.v4-guide-menu) > tbody { display: block; width: 100%; }
body.v4-scope.v3-route-page .article_inner > table:has(.v4-guide-menu) > tbody > tr { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
body.v4-scope.v3-route-page .article_inner > table:has(.v4-guide-menu) > tbody > tr > td { display: block; width: auto; padding: 0; }
body.v4-scope.v3-route-page .v4-video-link { padding: 20px; border: 1px solid var(--forest-border); background: var(--forest-surface); text-align: center; }
@media (max-width: 700px) {
  body.v4-scope.v3-route-page .article_inner > table:has(.v4-guide-menu) > tbody > tr { grid-template-columns: minmax(0, 1fr); }
  body.v4-scope.v3-route-page .v4-guide-menu ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
}

/* Class carousel. */
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) { height: auto; min-height: 0; color: var(--forest-text); background: none; font: 16px/1.5 var(--forest-body); }
body.v4-scope.v3-scope:is(.v3-route-classes, .v3-route-page) .v3-content .content { opacity: 1 !important; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderControl {
  position: relative;
  inset: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  justify-content: center;
  gap: 8px;
  width: auto;
  height: auto;
  margin: 12px auto 20px;
  overflow: visible;
  transform: none !important;
  z-index: 5;
}
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderControl a {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  border: 1px solid var(--forest-border);
  border-radius: 3px;
  background: var(--forest-surface);
  color: var(--forest-text);
  font: 14px/1.25 var(--forest-body);
  text-indent: 0;
  white-space: normal;
  overflow: visible;
  transform: none !important;
  cursor: pointer;
  margin: 0;
}
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderControl a:before { display: none; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderControl a.current { border-color: var(--forest-gold); background: var(--forest-raised); color: var(--forest-gold); }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .slider {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  overflow: visible;
}
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox {
  position: relative;
  left: 0 !important;
  width: 600%;
  height: auto;
}
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div { display: none; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current {
  display: block;
  float: none;
  position: relative;
  width: 16.66667%;
  padding-top: 0 !important;
  min-height: 0;
  overflow: visible;
}
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .9fr);
  align-items: center;
  gap: clamp(18px, 4vw, 54px);
  width: min(100%, 980px) !important;
  min-height: 0;
  float: none;
  top: auto !important;
  margin: 0 auto;
  padding: 16px !important;
}
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox {
  position: relative;
  inset: auto;
  grid-column: 1;
  grid-row: 1;
  width: auto;
  padding: 0;
  color: var(--forest-text);
  opacity: 1 !important;
  font-size: 16px;
}
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox h5,
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox .sub,
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox .description,
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox ul,
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox ul > li,
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox ul > li span { color: var(--forest-text) !important; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox h5 { color: var(--forest-gold) !important; font-size: clamp(30px, 4vw, 40px); }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox h6 { display: block; color: var(--forest-muted); background: var(--forest-raised); font-size: 13px; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox .race,
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox .weapon { color: var(--forest-muted) !important; font-size: 14px; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox .sub { margin: 8px 0; color: var(--forest-text) !important; font-size: 19px; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox .description { font-size: 16px; line-height: 1.5; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox .level,
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox ul { font-size: 14px; line-height: 1.5; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox .level *,
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox ul span { color: var(--forest-text) !important; font-size: 14px; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .level { margin: 10px 0 16px; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .level > div { float: none; width: 100%; min-height: 0; margin: 0; padding: 0; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .level > div:first-child { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .level > div:first-child > em { height: auto; margin: 0; padding: 0; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .level > div:first-child > span { border: 0; line-height: 1.5; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .level > div:last-child > ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0; margin: 0 0 6px; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .level > div:last-child > ol > li { width: auto; margin: 0; padding: 4px 2px; line-height: 1.5; border-color: var(--forest-border); overflow-wrap: anywhere; text-align: center; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .level > div:first-child:before,
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .level > div:last-child > ol > li:before { display: none; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox ul {
  width: 100%;
  margin: 14px 0 0;
  padding: 0;
  border-color: var(--forest-border);
}
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox ul > li { border-color: rgba(245, 200, 91, .35); }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .ch {
  position: relative;
  inset: auto;
  grid-column: 2;
  grid-row: 1;
  width: 100% !important;
  height: clamp(230px, 38vw, 440px) !important;
  background-position: center;
  background-size: contain !important;
  filter: none;
  opacity: 1 !important;
  transform: none;
}
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .class_block { grid-column: 1 / -1; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .description { background: var(--forest-surface); color: var(--forest-text) !important; opacity: 1 !important; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .classes_videos { margin: 12px 0 0; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .class_video video { display: block; width: min(100%, 480px); height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .description_classes_video { margin: 10px 0 0 !important; }
@media (max-width: 700px) {
  body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .wrap { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px 0; }
  body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .ch { grid-column: 1; grid-row: 1; height: clamp(230px, 72vw, 340px) !important; }
  body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox { grid-column: 1; grid-row: 2; }
  body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderBox > div.current .infoBox .level { overflow-x: auto; max-width: 100%; }
  body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderControl { grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(100%, 320px); }
  body.v4-scope.v3-scope #JOB:not(.v4-classes__catalog) .sliderControl a { width: 100%; }
}

/* New editorial sections share the legacy guide palette without narrowing forum controls. */
body.v4-scope.v3-scope .v4-prose {
  width: min(100% - 32px, 78ch);
  margin-inline: auto;
  color: var(--forest-text);
  overflow-wrap: anywhere;
  line-height: 1.75;
}
body.v4-scope.v3-scope .v4-prose :is(h2, h3, h4) { color: var(--forest-text); line-height: 1.3; }
body.v4-scope.v3-scope .v4-prose p + p { margin-top: 1em; }
body.v4-scope.v3-scope .v4-prose table { width: 100%; border-collapse: collapse; }
body.v4-scope.v3-scope .v4-prose th,
body.v4-scope.v3-scope .v4-prose td { padding: 10px 12px; border: 1px solid var(--forest-border); overflow-wrap: anywhere; }
body.v4-scope.v3-scope .v4-class-overview {
  width: min(100% - 32px, 78ch);
  margin: 18px auto 28px;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid var(--forest-border);
  border-radius: 4px;
  background: var(--forest-surface);
  color: var(--forest-text);
}
body.v4-scope.v3-scope .v4-class-overview h2 { margin-top: 0; color: var(--forest-gold); }
body.v4-scope.v3-scope .v4-class-overview ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; padding-left: 1.25em; }
body.v4-scope.v3-scope .v4-class-overview li { min-width: 0; }
@media (max-width: 600px) {
  body.v4-scope.v3-scope .v4-class-overview ul { grid-template-columns: minmax(0, 1fr); }
  body.v4-scope.v3-scope .v4-prose table { display: block; overflow-x: auto; }
}

/* Legacy guides use inline dark colors that disappear against the forest surface. */
body.v4-scope.v3-scope.v3-route-page .article_inner { font-size: 16px; line-height: 1.7; }
body.v4-scope.v3-scope.v3-route-page .article_inner :is(h4, h5) { font-family: var(--forest-body); font-size: 17px; line-height: 1.6; }
body.v4-scope.v3-scope.v3-route-page .article_inner :is(p, li, div, span, strong, em, b, i, font) { font-size: inherit !important; }
body.v4-scope.v3-scope.v3-route-page .article_inner img { max-width: 100%; height: auto !important; object-fit: contain; }
body.v4-scope.v3-scope.v3-route-page .article_inner img[style*="float"] { float: none !important; display: block; margin-inline: auto !important; }
body.v4-scope.v3-scope.v3-route-page .v3-content .article_holder .article_inner,
body.v4-scope.v3-scope.v3-route-page .v3-content .article_holder .article_inner :is(p, li, td, th, dd, span, div, strong, em, b, i, font) {
  color: var(--forest-text) !important;
}
body.v4-scope.v3-scope.v3-route-page .v3-content .article_holder .article_inner .article_subject { color: var(--forest-gold) !important; }
body.v4-scope.v3-scope.v3-route-page .v3-content .article_holder .article_inner a,
body.v4-scope.v3-scope.v3-route-page .v3-content .article_holder .article_inner a:visited {
  color: var(--forest-gold) !important;
}

/* Keep wide monster data readable in its own scroll frame on small screens. */
body.v4-scope.v3-scope.v3-route-page .v3-content .article_holder .article_inner .table-footer,
body.v4-scope.v3-scope.v3-route-page .v3-content .article_holder .article_inner .table-header {
  max-width: 100%;
  min-width: 0;
}
@media (max-width: 700px) {
  body.v4-scope.v3-scope.v3-route-page .v3-content .article_holder .article_inner .table-header {
    overflow-x: auto !important;
    overflow-y: hidden;
    border: 1px solid var(--forest-border);
    scrollbar-color: var(--forest-gold) var(--forest-surface);
  }
  body.v4-scope.v3-scope.v3-route-page .v3-content .article_holder .article_inner .table-header table {
    width: max-content;
    min-width: 100%;
    max-width: none;
  }
}

/* PsychoStats retains light panels and an inline highlight for the current player. */
body.v4-scope.v3-route-rating .v3-content .stats {
  background: var(--forest-surface);
  border-color: var(--forest-border);
  color: var(--forest-text);
}
body.v4-scope.v3-route-rating .v3-content .ps-table font[style*="color: gray"],
body.v4-scope.v3-route-rating .v3-content .player_details { color: var(--forest-muted) !important; }
body.v4-scope.v3-route-rating .v3-content .ps-player-table tr[style*="background-color"] > td,
body.v4-scope.v3-route-rating .v3-content .ps-player-table tr[style*="background-color"] > td * {
  color: #173b30 !important;
  text-shadow: none;
}
