:root {
  --bg: #050505;
  --ink: #1b1107;
  --muted: #6b4a1f;
  --panel: #dfc58f;
  --line: #7a5520;
  --alliance: #2f65d8;
  --horde: #b63b33;
  --accent: #0f4f82;
  --gold: #e5bd52;
}

html {
  background: #000;
}

body {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  justify-content: center;
  gap: 8px;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0 76px, rgba(0, 0, 0, .82) 310px),
    radial-gradient(circle at 18% 130px, rgba(40, 91, 92, .62), transparent 220px),
    radial-gradient(circle at 82% 120px, rgba(56, 43, 92, .48), transparent 230px),
    linear-gradient(90deg, #030604, #10231d 18%, #000 34%, #000 66%, #10231d 82%, #030604);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  padding: 56px 8px 18px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 44px;
  z-index: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(255, 255, 255, .08) 28px 30px),
    linear-gradient(180deg, #24211f, #0b0b0c 42%, #303033 43%, #121213);
  border-bottom: 2px solid #6c4b1e;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .55);
}

body::after {
  content: "K5Data-Archive";
  position: fixed;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 180px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffe783;
  text-align: center;
  font: 800 16px Georgia, serif;
  line-height: 1;
  background:
    radial-gradient(circle, rgba(34, 92, 139, .8), rgba(0, 0, 0, .55) 58%),
    linear-gradient(180deg, #533316, #1b1008);
  border: 2px solid #8d6724;
  box-shadow: 0 4px 0 #050505, 0 0 22px rgba(0, 0, 0, .8);
  text-shadow: 2px 2px 0 #000;
  pointer-events: none;
}

.sidebar,
main {
  position: relative;
  z-index: 2;
}

.sidebar {
  min-height: auto;
  align-self: start;
  padding: 6px;
  color: #f7d95d;
  background: rgba(0, 0, 0, .72);
  border: 1px solid #56411d;
  box-shadow: inset 0 0 0 1px #0b0b0b, 3px 3px 0 #000;
}

.brand {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 6px;
  margin-bottom: 8px;
  padding: 5px;
  background: linear-gradient(180deg, #092f61, #061326);
  border: 1px solid #8a6728;
  box-shadow: inset 0 0 0 1px #000;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 0;
  background: radial-gradient(circle, #ffe878, #bd8324);
  border: 2px solid #08152d;
  color: #06172f;
  font: 800 17px Georgia, serif;
}

.brand h1 {
  color: #fff178;
  font: 800 13px Georgia, serif;
  text-shadow: 1px 1px 0 #000;
}

.brand p {
  color: #cda94c;
  font-size: 10px;
}

.sidebar nav {
  gap: 5px;
}

.nav-section {
  margin: 8px 0 1px;
  color: #cda94c;
  font: 800 10px Georgia, serif;
  text-transform: uppercase;
  text-shadow: 1px 1px 0 #000;
}

.nav-section:first-child {
  margin-top: 0;
}

.nav-button {
  border: 1px solid #8a6728;
  border-radius: 0;
  padding: 4px 7px;
  color: #ffdb47;
  background:
    linear-gradient(135deg, transparent 0 7px, #8a6728 7px 9px, transparent 9px),
    linear-gradient(180deg, #0c3f78, #061a35);
  box-shadow: inset 0 0 0 1px #000, 2px 2px 0 #000;
  font: 700 12px Georgia, serif;
  text-shadow: 1px 1px 0 #000;
}

.nav-button.active,
.nav-button:hover {
  color: #fff5a0;
  background:
    linear-gradient(135deg, transparent 0 7px, #d0a545 7px 9px, transparent 9px),
    linear-gradient(180deg, #185a9a, #082348);
}

main {
  min-width: 0;
  padding: 0;
}

.topbar {
  min-height: 48px;
  margin-bottom: 8px;
  padding: 7px 10px;
  color: #ffe783;
  background:
    radial-gradient(circle at 82% 35%, rgba(255, 230, 148, .16), transparent 90px),
    linear-gradient(115deg, #201409, #7a3214 48%, #251109);
  border: 4px ridge #b78b3c;
  box-shadow: inset 0 0 0 2px #140d08, 3px 3px 0 #000;
}

.topbar h2 {
  color: #ffe878;
  font: 800 22px Georgia, serif;
  text-shadow: 2px 2px 0 #000;
}

#viewSubtitle {
  color: #d8b765;
}

.metric small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.item-holder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 0 8px 8px;
}

.subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.subtab {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #8a6728;
  border-radius: 0;
  background: #160f08;
  color: #f1cf68;
  font: 800 12px Georgia, serif;
  cursor: pointer;
}

.subtab.active,
.subtab:hover {
  color: #fff4a8;
  border-color: #d0a545;
  background:
    linear-gradient(180deg, rgba(46, 124, 192, .82), rgba(5, 30, 71, .98)),
    #053c76;
  text-shadow: 1px 1px 0 #000;
}

.projection-tabs {
  align-self: start;
  gap: 4px;
  margin: 0;
}

.projection-tabs .subtab {
  min-height: 22px;
  padding: 0 7px;
  border-color: #6f4c1c;
  color: #f1cf68;
  background: rgba(14, 8, 4, .72);
  font: 800 11px Arial, Helvetica, sans-serif;
  text-shadow: none;
}

.projection-tabs .subtab.active,
.projection-tabs .subtab:hover {
  color: #071528;
  border-color: #f1cf68;
  background: #f1cf68;
  text-shadow: none;
}

.hidden {
  display: none !important;
}

.item-metrics {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 6px;
  margin-bottom: 6px;
}

.pool-metrics {
  gap: 6px;
  margin-bottom: 6px;
}

.pool-metrics .metric {
  padding: 8px 10px;
}

.pool-metrics .metric strong {
  margin-top: 3px;
  font-size: 20px;
}

.item-metrics .metric {
  padding: 8px 10px;
}

.item-metrics .metric strong {
  margin-top: 3px;
  font-size: 20px;
}

.compact-table th,
.compact-table td,
.item-history-table th,
.item-history-table td {
  padding: 5px 8px;
  font-size: 12px;
}

.compact-table .pill,
.compact-table .status-pill,
.item-history-table .pill,
.item-history-table .status-pill {
  min-height: 20px;
  padding: 0 7px;
  font-size: 12px;
}

.pool-overall-table th:first-child,
.pool-overall-table td:first-child {
  width: 44px;
}

.item-holder-card {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  background: #1d1711;
}

.item-holder-card > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.item-holder-card span,
.item-holder-card small {
  color: var(--muted);
  font-size: 12px;
}

.item-holder-card.quality-2,
.quality-text.quality-2 {
  border-left-color: #49b25c;
  color: #49b25c;
}

.item-holder-card.quality-3,
.quality-text.quality-3 {
  border-left-color: #5c91ff;
  color: #5c91ff;
}

.item-holder-card.quality-4,
.quality-text.quality-4 {
  border-left-color: #b16cff;
  color: #b16cff;
}

.out-of-pool-card {
  color: var(--muted);
  opacity: .7;
}

.timeline-list {
  display: grid;
  gap: 8px;
  padding: 0 8px 8px;
}

.timeline-week {
  border-top: 1px solid rgba(82, 51, 20, .32);
  padding-top: 8px;
}

.timeline-week:first-child {
  border-top: 0;
  padding-top: 0;
}

.timeline-week h4 {
  margin: 0 0 8px;
  color: #4b2b14;
}

.timeline-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.timeline-item {
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  background: #1d1711;
}

.timeline-item strong,
.timeline-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-item.quality-2 {
  border-left-color: #49b25c;
}

.timeline-item.quality-3 {
  border-left-color: #5c91ff;
}

.timeline-item.quality-4 {
  border-left-color: #b16cff;
}

label {
  color: #d8b765;
  font-size: 11px;
}

.controls {
  align-items: end;
  gap: 14px;
}

.control-group {
  gap: 6px;
}

.control-group > span:first-child {
  color: #e5bd52;
  font: 800 12px Georgia, serif;
  letter-spacing: 0;
  text-shadow: 1px 1px 0 #000;
}

.select-control {
  position: relative;
  display: inline-grid;
  align-items: center;
}

.week-select-control::after {
  content: "";
  position: absolute;
  right: 9px;
  top: 13px;
  width: 9px;
  height: 9px;
  border-right: 2px solid #ffe878;
  border-bottom: 2px solid #ffe878;
  transform: rotate(45deg);
  pointer-events: none;
  filter: drop-shadow(1px 1px 0 #000);
}

select,
input {
  min-height: 36px;
  border: 1px solid #8a6728;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #25160b, #090605);
  color: #ffe878;
  box-shadow: inset 0 0 0 1px #000, 2px 2px 0 #000;
  padding: 0 10px;
}

select {
  min-width: 118px;
  padding-right: 30px;
  appearance: none;
  -webkit-appearance: none;
  font: 800 14px Georgia, serif;
  text-shadow: 1px 1px 0 #000;
}

.native-week-select {
  display: none;
}

.week-trigger {
  min-width: 118px;
  min-height: 36px;
  padding: 0 30px 0 10px;
  border: 1px solid #8a6728;
  border-radius: 8px;
  color: #ffe878;
  background:
    linear-gradient(180deg, #25160b, #090605);
  box-shadow: inset 0 0 0 1px #000, 2px 2px 0 #000;
  font: 800 14px Georgia, serif;
  text-align: left;
  text-shadow: 1px 1px 0 #000;
  cursor: pointer;
}

.week-trigger:hover,
.week-trigger:focus-visible {
  color: #fff5a0;
  border-color: #d0a545;
  outline: 0;
}

.week-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 30;
  min-width: 118px;
  padding: 4px;
  border: 1px solid #8a6728;
  background: #090605;
  box-shadow: inset 0 0 0 1px #000, 2px 2px 0 #000;
}

.week-option {
  display: block;
  width: 100%;
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  color: #f1cf68;
  background: transparent;
  font: 800 13px Georgia, serif;
  text-align: left;
  text-shadow: 1px 1px 0 #000;
  cursor: pointer;
}

.week-option.active,
.week-option:hover {
  color: #fff5a0;
  background: linear-gradient(180deg, #143d6f, #061b35);
}

.faction-buttons {
  display: flex;
  gap: 8px;
}

.faction-filter {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid #8a6728;
  border-radius: 0;
  color: #ffdb47;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 226, 126, .16), transparent 56%),
    linear-gradient(180deg, #14100b, #050403);
  box-shadow: inset 0 0 0 1px #000, 2px 2px 0 #000;
  font: 800 17px Georgia, serif;
  text-shadow: 1px 1px 0 #000;
  cursor: pointer;
}

.faction-filter.active {
  color: #fff5a0;
  border-color: #d0a545;
  box-shadow: inset 0 0 0 2px #174f8c, 2px 2px 0 #000;
}

.faction-filter img {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
  margin: 0 auto;
  filter: drop-shadow(1px 1px 0 #000) drop-shadow(0 0 4px rgba(255, 218, 92, .25));
}

.faction-filter.alliance.active {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 226, 126, .22), transparent 56%),
    linear-gradient(180deg, #14100b, #050403);
}

.faction-filter.horde.active {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 226, 126, .22), transparent 56%),
    linear-gradient(180deg, #14100b, #050403);
}

.metric,
.panel {
  border: 2px ridge #8f6727;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(71, 42, 14, .16), transparent 14%, transparent 86%, rgba(71, 42, 14, .14)),
    linear-gradient(180deg, #f5e8bf, #dfc58f);
  box-shadow: inset 0 0 18px rgba(83, 50, 17, .26), 3px 3px 0 rgba(0, 0, 0, .58);
}

.metric {
  padding: 8px 10px;
}

.metric span,
.briefing-grid h4,
th {
  color: #4d2a12;
  font-family: Georgia, serif;
}

.metric strong {
  font: 800 22px Georgia, serif;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  padding: 5px 8px;
  color: #fff178;
  background:
    linear-gradient(180deg, rgba(46, 124, 192, .75), rgba(5, 30, 71, .95)),
    #053c76;
  border-bottom: 2px solid #1a1009;
}

.panel-header h3 {
  color: #fff178;
  font: 800 14px Georgia, serif;
  text-shadow: 1px 1px 0 #000;
}

.panel-subtitle {
  color: #d8b765;
}

.rank-projection {
  grid-template-columns: 1fr;
  gap: 0;
  margin: 10px;
  padding: 0;
  border: 3px ridge #8f6727;
  background:
    linear-gradient(90deg, rgba(71, 42, 14, .16), transparent 14%, transparent 86%, rgba(71, 42, 14, .14)),
    linear-gradient(180deg, #f5e8bf, #dfc58f);
  box-shadow: inset 0 0 18px rgba(83, 50, 17, .26), 3px 3px 0 rgba(0, 0, 0, .58);
}

.rank-projection > div:first-child {
  padding: 0;
}

.rank-projection h4 {
  margin: 0;
  padding: 6px 10px;
  color: #fff178;
  background:
    linear-gradient(180deg, rgba(46, 124, 192, .75), rgba(5, 30, 71, .95)),
    #053c76;
  border-bottom: 2px solid #1a1009;
  font: 800 15px Georgia, serif;
  text-shadow: 1px 1px 0 #000;
}

.rank-projection p {
  margin: 0;
  padding: 10px 12px 0;
  color: #3c2811;
  font-size: 13px;
  line-height: 1.35;
}

.rank-projection .projection-reset {
  padding-bottom: 10px;
  color: #17365f;
  font-weight: 800;
}

.projection-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0 10px 10px;
  align-content: start;
}

.projection-grid div {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(83, 50, 17, .4);
  border-left-width: 0;
  border-radius: 0;
  background: rgba(255, 245, 202, .42);
}

.projection-grid div:first-child {
  border-left-width: 1px;
}

.projection-grid span {
  display: block;
  color: #684315;
  font: 800 10px Arial, sans-serif;
  text-transform: uppercase;
}

.projection-grid strong {
  display: block;
  margin-top: 4px;
  color: #1b1107;
  font: 800 13px Georgia, serif;
  line-height: 1.2;
}

.projection-grid b,
.projection-grid small {
  display: block;
}

.projection-grid small {
  margin-top: 2px;
  color: #684315;
  font: 700 11px Arial, sans-serif;
}

.honor-calculator-panel {
  overflow: hidden;
  border: 3px ridge #8f6727;
  background:
    linear-gradient(90deg, rgba(71, 42, 14, .12), transparent 16%, transparent 84%, rgba(71, 42, 14, .12)),
    linear-gradient(180deg, #f5e8bf, #dfc58f);
}

.honor-calculator-header {
  min-height: 42px;
  align-items: center;
}

.calculator-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}

.calculator-action {
  min-height: 24px;
  padding: 0 10px;
  font: 900 11px Arial, Helvetica, sans-serif;
}

.calculator-action.active {
  color: #071528;
  border-color: #f1cf68;
  background: #f1cf68;
  text-shadow: none;
}

.honor-outcomes-wrap {
  overflow-x: auto;
}

.honor-outcomes-table {
  min-width: 1040px;
  border-collapse: collapse;
}

.honor-outcomes-table th {
  background: rgba(91, 58, 20, .2);
  font-size: 11px;
  text-align: left;
  text-transform: uppercase;
}

.honor-outcomes-table td {
  vertical-align: middle;
  font-size: 12px;
}

.honor-outcomes-table td:first-child strong {
  color: #120c06;
  font: 900 13px Arial, Helvetica, sans-serif;
}

.honor-path {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 520px;
}

.honor-path-chip {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  min-width: 92px;
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid #8a6728;
  border-radius: 7px;
  color: #171008;
  background: rgba(247, 249, 229, .86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65);
  font: 900 12px Arial, Helvetica, sans-serif;
  white-space: nowrap;
}

.honor-path-chip small {
  color: #684315;
  font-size: 11px;
  font-weight: 900;
}

.honor-path-chip.blocked {
  border-color: #8f4c31;
  background: rgba(248, 226, 207, .88);
}

.world-overview-metrics {
  margin-bottom: 10px;
}

.frontpage-chat {
  margin: 10px 0;
}

.frontpage-chat .activity-log {
  max-height: 330px;
}

.world-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.world-overview-list {
  display: grid;
  gap: 0;
  padding: 8px 10px 10px;
}

.world-overview-row {
  display: grid;
  grid-template-columns: minmax(150px, .9fr) minmax(0, 1.5fr);
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid rgba(83, 50, 17, .42);
  border-top: 0;
  background: rgba(255, 245, 202, .44);
}

.world-overview-row:first-child {
  border-top: 1px solid rgba(83, 50, 17, .42);
}

.world-overview-row.featured {
  background: rgba(255, 241, 120, .32);
}

.world-overview-row strong,
.world-overview-row .player-name-with-icons,
.world-overview-row .item-link-with-icon {
  min-width: 0;
}

.world-overview-row span {
  min-width: 0;
  color: #684315;
  font-size: 11px;
  font-weight: 800;
}

.pvp-teaser-panel {
  margin-top: 10px;
}

.world-overview-pvp {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.world-overview-pvp article {
  padding: 8px 10px;
  border: 1px solid rgba(83, 50, 17, .42);
  background: rgba(255, 245, 202, .46);
}

.world-overview-pvp span {
  display: block;
  color: #684315;
  font: 800 10px Arial, sans-serif;
  text-transform: uppercase;
}

.world-overview-pvp strong {
  display: block;
  margin-top: 3px;
  color: #1b1107;
  font: 900 18px Georgia, serif;
}

.arsenal-grid {
  gap: 6px;
  padding: 8px 10px;
}

.arsenal-grid .metric {
  padding: 6px 8px;
}

.arsenal-grid .metric strong {
  margin-top: 2px;
  font-size: 17px;
}

.arsenal-list {
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 0;
  padding: 0 10px 10px;
}

.arsenal-item {
  min-height: 30px;
  padding: 5px 7px;
  border-radius: 0;
  background: rgba(255, 245, 202, .48);
  border-color: rgba(83, 50, 17, .42);
}

.item-link-icon {
  width: 21px;
  height: 21px;
  flex-basis: 21px;
  border-color: #0a0704;
  box-shadow: inset 0 0 0 1px #b78b3c, 1px 1px 0 #000;
}

.player-alias-name {
  color: #684315;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.guild-active-pool-count {
  margin-left: 4px;
  color: #2b9743;
  font-weight: 900;
  white-space: nowrap;
}

.arsenal-item strong {
  font-size: 12px;
}

.arsenal-slot,
.arsenal-ilvl,
.arsenal-enchants {
  color: #684315;
  font-size: 10px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .72);
}

.modal-overlay.hidden {
  display: none;
}

.modal-panel {
  width: min(980px, calc(100vw - 30px));
  max-height: min(760px, calc(100vh - 36px));
  overflow: hidden;
  background: var(--panel);
  border: 2px ridge #b78b3c;
  box-shadow: inset 0 0 0 1px #000, 5px 5px 0 #000;
}

.historical-items-list {
  display: grid;
  gap: 0;
  max-height: calc(min(760px, 100vh - 36px) - 84px);
  overflow-y: auto;
  padding: 10px;
}

.historical-item-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(120px, .8fr) 120px 140px 96px;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid rgba(83, 50, 17, .45);
  border-left: 4px solid #6b4821;
  background: rgba(255, 245, 202, .55);
}

.historical-item-row + .historical-item-row {
  border-top: 0;
}

.historical-item-row > span,
.historical-item-row > small {
  min-width: 0;
  overflow: hidden;
  color: #684315;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.historical-item-row.quality-2 {
  border-left-color: #2b9743;
}

.historical-item-row.quality-3 {
  border-left-color: #2767d8;
}

.historical-item-row.quality-4 {
  border-left-color: #7d3bd6;
}

.level-trend-stage {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid rgba(83, 50, 17, .28);
  background:
    linear-gradient(90deg, rgba(15, 79, 130, .08), rgba(229, 189, 82, .12), rgba(182, 59, 51, .07)),
    rgba(255, 245, 202, .18);
}

.level-trend-scoreboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.level-trend-scoreboard > div {
  padding: 8px;
  border: 1px solid rgba(83, 50, 17, .45);
  background: rgba(255, 245, 202, .55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

.level-trend-scoreboard span,
.level-bucket-card span {
  display: block;
  color: #684315;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.level-trend-scoreboard strong {
  display: block;
  margin-top: 3px;
  color: #130d07;
  font-size: 24px;
}

.level-trend-buckets {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.level-bucket-card {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid rgba(83, 50, 17, .45);
  background:
    linear-gradient(180deg, rgba(255, 245, 202, .72), rgba(210, 176, 99, .42));
  color: #130d07;
  text-align: left;
  cursor: default;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .08);
}

.level-bucket-card strong {
  font-size: 20px;
}

.level-bucket-card em {
  color: #684315;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.level-bucket-card.gain {
  border-color: rgba(43, 151, 67, .75);
}

.level-bucket-card.gain em {
  color: #1f7a39;
}

.level-bucket-card.loss {
  border-color: rgba(182, 59, 51, .75);
}

.level-bucket-card.loss em {
  color: #9b2b24;
}

.level-trend-timeline {
  position: relative;
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 30px;
  overflow-x: auto;
  padding: 4px 2px;
}

.level-trend-timeline::before {
  content: "";
  position: absolute;
  right: 8px;
  left: 8px;
  top: 15px;
  height: 3px;
  background: rgba(83, 50, 17, .26);
}

.level-week-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 24px;
  border: 1px solid #8a6728;
  background: #e0c889;
  color: #3b250d;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .22);
}

.level-week-dot.past {
  background: #b8d38b;
}

.level-week-dot.active {
  background: #fff178;
  color: #130d07;
  transform: translateY(-2px);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .28), 0 0 16px rgba(255, 241, 120, .65);
}

.level-trend-bars {
  display: grid;
  grid-template-columns: repeat(60, minmax(13px, 1fr));
  align-items: end;
  gap: 4px;
  min-width: 1100px;
  overflow-x: auto;
  padding: 6px 10px 14px;
}

.level-trend-column {
  display: grid;
  grid-template-rows: 18px 148px 17px;
  align-items: end;
  min-width: 0;
  text-align: center;
}

.level-trend-column-track {
  display: flex;
  align-items: end;
  height: 148px;
  overflow: hidden;
  border: 1px solid #8a6728;
  background:
    linear-gradient(180deg, rgba(255, 245, 202, .22), rgba(22, 15, 8, .18)),
    rgba(22, 15, 8, .28);
}

.level-trend-column-fill {
  width: 100%;
  height: var(--level-height);
  background: linear-gradient(180deg, #49b85e, #21733f 62%, #17365f);
  transform: scaleY(1);
  transform-origin: bottom;
  animation: levelWave .48s cubic-bezier(.2, .85, .28, 1);
  transition: height .45s ease, background .25s ease;
}

.level-trend-column.peak .level-trend-column-track {
  border-color: #f4c654;
  box-shadow: inset 0 0 0 1px rgba(255, 241, 120, .45);
}

.level-trend-column.peak .level-trend-column-fill {
  background: linear-gradient(180deg, #fff178, #2b9743 54%, #17365f);
}

.level-trend-column.gain .level-trend-column-fill {
  background: linear-gradient(180deg, #6ee07b, #2b9743 58%, #17365f);
}

.level-trend-column.loss .level-trend-column-fill {
  background: linear-gradient(180deg, #e97b63, #b63b33 58%, #5a2021);
}

.level-trend-column strong {
  min-width: 0;
  color: #130d07;
  font-size: 10px;
}

.level-trend-value {
  min-width: 0;
  color: #684315;
  font-size: 10px;
  font-weight: 800;
}

@keyframes levelWave {
  from {
    transform: scaleY(.08);
    filter: brightness(1.35);
  }
  to {
    transform: scaleY(1);
    filter: brightness(1);
  }
}

.level-daily-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
  align-items: end;
  gap: 8px;
  padding: 10px;
  min-height: 180px;
  border-top: 1px solid rgba(83, 50, 17, .24);
}

.level-bucket-activity {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  padding: 10px 10px 0;
}

.level-active-bucket {
  display: grid;
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(83, 50, 17, .42);
  background: rgba(255, 245, 202, .5);
}

.level-active-bucket.top {
  border-color: #f4c654;
  background: rgba(255, 241, 120, .42);
  box-shadow: inset 0 0 0 1px rgba(255, 241, 120, .45);
}

.level-active-bucket > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.level-active-bucket span {
  color: #684315;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.level-active-bucket strong {
  color: #130d07;
  font-size: 18px;
}

.level-active-track {
  height: 8px;
  overflow: hidden;
  border: 1px solid #8a6728;
  background: rgba(22, 15, 8, .2);
}

.level-active-fill {
  height: 100%;
  background: linear-gradient(90deg, #2b5d93, #d7902d, #fff178);
  transition: width .35s ease;
}

.level-daily-column {
  display: grid;
  grid-template-rows: 18px 118px 30px;
  align-items: end;
  min-width: 0;
  text-align: center;
}

.level-daily-column > span {
  color: #684315;
  font-size: 11px;
  font-weight: 900;
}

.level-daily-track {
  display: flex;
  align-items: end;
  height: 118px;
  overflow: hidden;
  border: 1px solid #8a6728;
  background:
    linear-gradient(180deg, rgba(255, 245, 202, .24), rgba(22, 15, 8, .14)),
    rgba(22, 15, 8, .22);
}

.level-daily-fill {
  width: 100%;
  height: var(--daily-height);
  background: linear-gradient(180deg, #fff178, #d7902d 45%, #2b5d93);
  animation: levelWave .48s cubic-bezier(.2, .85, .28, 1);
  transform-origin: bottom;
}

.level-daily-column strong {
  min-width: 0;
  color: #130d07;
  font-size: 10px;
}

.briefing-lead,
.briefing-item,
.briefing-empty {
  border-radius: 0;
}

.briefing-lead {
  background: rgba(255, 244, 194, .36);
  border-color: rgba(83, 50, 17, .34);
}

.briefing-lead h4 {
  color: #17365f;
  font-family: Georgia, serif;
}

.briefing-item {
  background: rgba(255, 245, 202, .44);
  border-color: rgba(83, 50, 17, .34);
}

.briefing-item:hover,
.link-button:hover {
  color: #17365f;
}

.bar-track {
  position: relative;
  height: 12px;
  border-radius: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 245, 202, .42), rgba(75, 47, 18, .18)),
    rgba(0, 0, 0, .18);
  border: 1px solid rgba(83, 50, 17, .42);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 212, .45),
    inset 0 -1px 0 rgba(65, 39, 14, .24);
}

.bar-track::after {
  content: "";
  position: absolute;
  inset: 1px 0 auto;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .24), transparent);
  pointer-events: none;
}

.bar-fill {
  position: relative;
  border-radius: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .34),
    inset 0 -1px 0 rgba(0, 0, 0, .24);
  animation: barGrow .45s ease-out both;
}

.bar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), transparent);
  mix-blend-mode: screen;
}

.bar-fill.alliance {
  background:
    linear-gradient(180deg, #5f96ff, #2f65d8 62%, #1b3f9a);
}

.bar-fill.horde {
  background:
    linear-gradient(180deg, #dd6b5f, #b63b33 62%, #7f241f);
}

@keyframes barGrow {
  from {
    transform: scaleX(.04);
    transform-origin: left;
    filter: brightness(1.18);
  }
  to {
    transform: scaleX(1);
    transform-origin: left;
    filter: brightness(1);
  }
}

.class-versus-row {
  grid-template-columns: 38px minmax(58px, 1fr) minmax(96px, auto) minmax(58px, 1fr) 38px;
  gap: 8px;
}

.class-count,
.class-pair-label {
  font-size: 12px;
}

.bracket-class-balance {
  padding: 8px 10px;
  gap: 7px;
}

.bracket-class-single-row {
  grid-template-columns: minmax(82px, 118px) 1fr minmax(34px, auto);
  gap: 8px;
}

.bracket-class-row {
  grid-template-columns: 34px minmax(48px, 1fr) minmax(88px, auto) minmax(48px, 1fr) 34px;
}

table {
  font-size: 12px;
}

th,
td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(82, 51, 20, .32);
}

th {
  background: rgba(91, 58, 20, .14);
}

tbody tr:hover {
  background: rgba(255, 244, 194, .38);
}

.pill {
  border-radius: 0;
  min-height: 18px;
  padding: 0 6px;
  font-size: 11px;
}

.status-pill {
  min-height: 18px;
  padding: 0 6px;
  font-size: 11px;
}

.status-pill.previous {
  color: #ffd6d6;
  background: #651515;
  border: 1px solid #9b2a2a;
}

.link-button {
  color: #17365f;
  font-family: inherit;
}

.activity-actor {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.activity-player-tooltip {
  position: fixed;
  z-index: 8000;
  display: none;
  min-width: 240px;
  max-width: min(340px, calc(100vw - 20px));
  padding: 10px 12px;
  border: 2px ridge #b78b3c;
  background: rgba(6, 4, 3, .97);
  color: #f1d28b;
  box-shadow: inset 0 0 0 1px #000, 4px 4px 0 #000, 0 0 18px rgba(0, 0, 0, .62);
  text-align: left;
  text-shadow: 1px 1px 0 #000;
  pointer-events: none;
}

.activity-player-tooltip.visible {
  display: grid;
  gap: 4px;
}

.activity-player-tooltip strong {
  color: #fff;
  font: 800 14px Georgia, serif;
}

.activity-player-tooltip span {
  color: #ffd100;
  font: 700 12px/1.25 "Trebuchet MS", Arial, sans-serif;
}

.activity-player-tooltip span:first-of-type {
  color: #9d9d9d;
}

.player-name-with-icons {
  gap: 2px;
}

.player-name-with-icons .player-link {
  margin-left: 3px;
}

.player-mini-icon {
  width: 15px;
  height: 15px;
  filter: drop-shadow(1px 1px 0 #000);
}

.item-link {
  font-weight: 800;
  text-decoration: none;
}

.item-link:hover {
  text-decoration: underline;
}

.classicdb-tooltip {
  min-width: 320px;
  max-width: min(440px, calc(100vw - 24px));
  padding: 12px 14px;
  border-radius: 0;
  border: 2px ridge #b78b3c;
  background: rgba(6, 4, 3, .97);
  box-shadow: inset 0 0 0 1px #000, 4px 4px 0 #000;
  font-size: 14px;
}

.classicdb-tooltip th {
  color: #ffe878;
}

.secondary-button {
  border-radius: 0;
  background: #160f08;
  color: #ffe878;
  border-color: #8a6728;
}

.compact {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 980px) {
  body {
    grid-template-columns: 1fr;
    padding-top: 92px;
  }

  body::after {
    width: 190px;
    font-size: 18px;
  }

  .sidebar {
    width: min(100%, 620px);
    margin: 0 auto;
  }

  main {
    width: min(100%, 620px);
    margin: 0 auto;
  }

  .item-holder-grid {
    grid-template-columns: 1fr;
  }

  .world-overview-grid,
  .world-overview-pvp {
    grid-template-columns: 1fr;
  }

  .world-overview-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .arsenal-list {
    grid-template-columns: 1fr;
  }

  .historical-item-row {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 4px;
  }

  .level-trend-scoreboard,
  .level-trend-buckets {
    grid-template-columns: 1fr;
  }

  .level-bucket-activity {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .level-trend-bars {
    grid-template-columns: repeat(51, minmax(18px, 1fr));
    min-width: 1080px;
  }

  .timeline-items {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .class-versus-row {
    grid-template-columns: 32px minmax(42px, 1fr) minmax(74px, auto) minmax(42px, 1fr) 32px;
    gap: 6px;
  }
}

@media print {
  body.printing-player #playerDetail > .panel {
    border: 2px solid #8a6728 !important;
    background: #f5e8bf !important;
  }

  body.printing-player .panel-header {
    color: #1b1107 !important;
    background: #d9bd7b !important;
    border-bottom: 1px solid #8a6728 !important;
  }

  body.printing-player .panel-header h3,
  body.printing-player h4,
  body.printing-player th {
    color: #4d2a12 !important;
    text-shadow: none !important;
  }

  body.printing-player .metric,
  body.printing-player .arsenal-item,
  body.printing-player .projection-grid div {
    background: rgba(255, 245, 202, .8) !important;
    border-color: rgba(83, 50, 17, .55) !important;
  }
}
