:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --ink: #202337;
  --muted: #515565;
  --line: #dcd9d1;
  --cream: #fffefa;
  --accent: #51459d;
  --navy: #20223a;
  --title:
    "Barlow Condensed", "Arial Narrow", "Franklin Gothic Medium", Arial,
    sans-serif;
  --body: "Inter", "Segoe UI", Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 14px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.52 var(--body);
}
[hidden] {
  display: none !important;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration: underline;
}
button,
select {
  font: inherit;
}
button,
select,
a {
  touch-action: manipulation;
}
:focus-visible {
  outline: 3px solid #a76914;
  outline-offset: 3px;
}
.wrap {
  width: min(1280px, calc(100% - 80px));
  margin: auto;
}
.mast {
  background: #1d2034;
  color: #f6f3e8;
  border-bottom: 1px solid #474456;
}
.mast-inner {
  height: 61px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-weight: 800;
  font-size: 1.14rem;
  letter-spacing: -0.045em;
  text-decoration: none;
}
.mast nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.mast nav a {
  font-size: 0.87rem;
  font-weight: 650;
  color: #e5e2ed;
  text-decoration: none;
}
.mast nav a:hover,
.brand:hover {
  text-decoration: underline;
}
.emblem {
  image-rendering: pixelated;
  border-radius: 5px;
  flex-shrink: 0;
}
.skip {
  position: absolute;
  left: 10px;
  top: -60px;
  z-index: 4;
  padding: 8px;
  background: white;
}
.skip:focus {
  top: 8px;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fffbf2;
  background: #292942;
  border-bottom: 4px solid #b59078;
}
.hero:before {
  content: "";
  position: absolute;
  inset: 0 0 0 34%;
  z-index: -2;
  background: url("/assets/citadel.png") center 61% / cover no-repeat;
  image-rendering: pixelated;
}
.hero:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    #292942 16%,
    rgba(41, 41, 66, 0.98) 32%,
    rgba(41, 41, 66, 0.82) 45%,
    rgba(41, 41, 66, 0.07) 74%,
    transparent 95%
  );
}
.hero-content {
  padding: 25px 0 30px;
}
.hero-meta,
.eyebrow {
  font-size: 0.71rem;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero-meta {
  color: #efdcbd;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}
.hero-meta i {
  height: 12px;
  border-left: 1px solid #a49a9d;
}
.status-dot {
  width: 7px;
  height: 7px;
  background: #f6c77d;
  transform: rotate(45deg);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.035em;
}
.hero h1 {
  font-family: var(--title);
  font-weight: 850;
  font-size: clamp(2.3rem, 4vw, 4.15rem);
  margin: 0;
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  color: #ffd08e;
}
.dek {
  font-size: 1rem;
  color: #e0dce9;
  margin: 9px 0 0;
}
.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(238px, 280px);
  gap: 30px;
  align-items: start;
  padding: 29px 0 44px;
}
.section-head,
.panel-head,
.mode-detail > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.section-head h2,
.method > h2 {
  font-size: 1.8rem;
  margin: 0;
  font-family: var(--title);
}
.muted-link {
  font-size: 0.82rem;
  font-weight: 650;
}
.board form {
  display: flex;
  gap: 18px;
  align-items: end;
  padding: 18px 0 20px;
}
.board .filter-field,
legend {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 700;
}
.board .filter-field {
  display: grid;
  gap: 5px;
  min-width: 128px;
}
.board select {
  height: 38px;
  background: var(--cream);
  border: 1px solid #b8b7b4;
  border-radius: 5px;
  color: var(--ink);
  padding: 0 25px 0 10px;
  font-size: 0.87rem;
  font-weight: 600;
}
.board fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
legend {
  padding: 0 0 5px;
}
.switch {
  display: flex;
  padding: 2px;
  border: 1px solid #c3c1bb;
  border-radius: 6px;
  background: #eae7e1;
}
.switch label {
  position: relative;
  cursor: pointer;
}
.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.switch span {
  display: block;
  padding: 6px 17px;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 700;
}
.switch input:checked + span {
  background: var(--navy);
  color: white;
}
.switch input:focus-visible + span {
  outline: 3px solid #b17b28;
}
.mode-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
  overflow: hidden;
  margin-bottom: 16px;
}
.panel-head {
  background: var(--navy);
  color: #fff8ec;
  padding: 10px 16px;
}
.panel-head h3 {
  margin: 0;
  font-family: var(--title);
  font-size: 1.22rem;
}
.result-count {
  color: #e0deea;
  font-size: 0.75rem;
  font-weight: 600;
}
.team {
  padding: 9px 16px;
  margin: 0;
  background: #eeece6;
  font-size: 0.8rem;
  color: #474957;
}
.rank-table {
  list-style: none;
  padding: 0;
  margin: 0;
}
.unit-row {
  display: grid;
  grid-template-columns: 34px minmax(145px, 0.85fr) minmax(170px, 1.4fr) 64px;
  gap: 12px;
  align-items: center;
  padding: 15px 14px;
  min-height: 84px;
}
.unit-row + .unit-row {
  border-top: 1px solid var(--line);
}
.grade {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 34px;
  border-radius: 4px;
  font-family: var(--title);
  font-size: 1.3rem;
  line-height: 1;
  font-weight: 800;
  border: 1px solid;
}
.grade-S {
  background: #fce4aa;
  border-color: #d3ab5c;
  color: #65420c;
}
.grade-A {
  background: #dcdaf4;
  border-color: #b6addb;
  color: #4a3a7b;
}
.grade-B {
  background: #d6e7e4;
  border-color: #9bbeb7;
  color: #265851;
}
.unit-id {
  display: flex;
  align-items: center;
  gap: 10px;
}
.unit-name {
  font-weight: 750;
  line-height: 1.17;
  color: var(--ink);
  text-decoration: none;
  display: block;
  letter-spacing: -0.024em;
}
.unit-id small,
.pick small,
.side-card small,
.mode-detail small,
.sources small {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.42;
}
.unit-id small {
  margin-top: 3px;
}
.pick p {
  font-size: 0.86rem;
  line-height: 1.4;
  margin: 0 0 3px;
}
.obtain,
.rail-link,
.back {
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}
.obtain {
  white-space: nowrap;
}
.empty {
  padding: 24px;
}
.empty p {
  margin: 6px 0 12px;
}
.empty button {
  border-radius: 4px;
  color: white;
  border: 0;
  background: var(--navy);
  padding: 8px 14px;
  cursor: pointer;
}
.rail {
  display: grid;
  gap: 17px;
  padding-top: 2px;
}
.side-card {
  padding: 19px 18px;
  border: 1px solid var(--line);
  background: var(--cream);
  border-radius: 7px;
}
.side-card h2 {
  margin: 8px 0 9px;
  font-size: 1.45rem;
  font-family: var(--title);
}
.eyebrow {
  color: #5d5676;
}
.side-card p {
  font-size: 0.9rem;
  margin-bottom: 13px;
}
.comparison {
  border-top: 4px solid #b6864e;
}
.event {
  background: #eeeaf4;
  border-color: #d5cde4;
  border-left: 4px solid #8d7fae;
}
.bars {
  margin: 18px 0 8px;
}
.bars > div:not(.bar) {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}
.bar {
  height: 7px;
  margin: 5px 0 11px;
  background: #eae6dd;
  border-radius: 2px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  background: #ad702e;
}
.bar.second i {
  width: 100%;
  background: #595674;
}
.comparison small {
  margin-bottom: 12px;
}
.rail-link {
  display: inline-block;
}
.method {
  padding: 20px 0 0;
  max-width: 810px;
}
.method h3 {
  margin: 22px 0 8px;
}
.method p {
  margin-bottom: 10px;
  font-size: 0.94rem;
  color: #404354;
}
.definitions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.definitions > div {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
}
.definitions .grade {
  width: 26px;
  height: 28px;
  font-size: 1.04rem;
}
.source-line,
.method .source-line {
  font-size: 0.77rem;
  line-height: 1.65;
  color: #5b5869;
}
.source-line a {
  color: #5c5283;
}
.source-line a:hover {
  color: #24213e;
}
.detail {
  padding: 23px 0 40px;
  max-width: 1100px;
}
.back {
  display: inline-flex;
  padding: 6px 0;
}
.detail-head {
  display: flex;
  align-items: center;
  gap: 17px;
  margin: 22px 0 12px;
}
.detail h1 {
  font-family: var(--title);
  font-size: clamp(2rem, 3vw, 3.4rem);
  margin: 7px 0 0;
  max-width: 820px;
}
.lead {
  font-size: 1.12rem;
  max-width: 780px;
  color: var(--muted);
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 265px;
  gap: 36px;
  margin: 24px 0;
}
.detail article > section {
  border-top: 1px solid var(--line);
  padding: 24px 0 6px;
}
.detail article #obtain {
  padding: 20px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  margin-bottom: 24px;
  scroll-margin-top: 15px;
}
.detail h2 {
  font-size: 1.45rem;
  margin: 5px 0 12px;
}
.detail ol {
  padding-left: 24px;
}
.detail li {
  margin: 9px 0;
}
.detail dt {
  font-size: 0.79rem;
  color: var(--muted);
  margin-top: 10px;
}
.detail dd {
  margin: 0;
  font-weight: 650;
}
.detail dl {
  margin-bottom: 18px;
}
.mode-detail {
  padding: 12px 0;
}
.mode-detail > div {
  justify-content: flex-start;
  margin-bottom: 8px;
}
.mode-detail h3 {
  margin: 0;
}
.mode-detail p {
  margin-bottom: 4px;
}
.sources {
  border-block: 1px solid var(--line);
  padding: 13px 0;
  margin: 5px 0 17px;
}
.sources summary {
  cursor: pointer;
  font-weight: 650;
}
.sources small {
  margin-top: 2px;
}
.error-page {
  min-height: 50vh;
  padding: 70px 0;
}
.error-page h1 {
  font-size: 3rem;
  margin: 8px 0;
}
footer {
  background: var(--navy);
  color: #e8e5ec;
  padding: 22px 0;
  font-size: 0.8rem;
}
footer a {
  color: #e5d2b6;
}
footer .wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
}
footer a {
  margin-left: auto;
}
@media (max-width: 1080px) {
  .wrap {
    width: calc(100% - 44px);
  }
  .main-grid {
    grid-template-columns: minmax(0, 1fr) 228px;
    gap: 17px;
  }
  .unit-row {
    grid-template-columns: 30px minmax(120px, 0.86fr) minmax(130px, 1.1fr) 57px;
    gap: 8px;
  }
  .unit-id img {
    width: 36px;
    height: 36px;
  }
  .board form {
    gap: 10px;
  }
}
@media (max-width: 840px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
  .rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 5px;
  }
  .unit-id img {
    width: 46px;
    height: 46px;
  }
  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 18px;
  }
}
@media (max-width: 620px) {
  .wrap {
    width: calc(100% - 28px);
  }
  .mast-inner {
    height: 45px;
  }
  .brand {
    font-size: 1rem;
  }
  .brand .emblem {
    width: 29px;
    height: 29px;
  }
  .mast nav {
    gap: 12px;
  }
  .mast nav a {
    font-size: 0.76rem;
  }
  .hero-content {
    padding: 16px 0;
  }
  .hero:before {
    left: 10%;
    background-position: 70% center;
  }
  .hero:after {
    background: linear-gradient(
      90deg,
      rgba(34, 34, 58, 0.95),
      rgba(35, 35, 58, 0.8) 55%,
      rgba(35, 35, 58, 0.24)
    );
  }
  .hero h1 {
    font-size: clamp(1.9rem, 6vw, 2.5rem);
    text-wrap: initial;
  }
  .hero-meta {
    font-size: 0.61rem;
    margin-bottom: 6px;
    gap: 6px;
  }
  .dek {
    font-size: 0.84rem;
    margin-top: 5px;
  }
  .main-grid {
    padding-top: 15px;
    gap: 12px;
  }
  .section-head h2 {
    font-size: 1.45rem;
  }
  .board form {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 8px;
    padding: 10px 0 12px;
  }
  .board .filter-field {
    min-width: 0;
  }
  .board select {
    padding: 0 0 0 4px;
    min-width: 0;
    width: 100%;
    height: 35px;
    font-size: 0.79rem;
  }
  .switch span {
    padding: 6px 8px;
    font-size: 0.78rem;
  }
  .board .filter-field,
  legend {
    font-size: 0.68rem;
  }
  .panel-head {
    padding: 7px 11px;
  }
  .team {
    padding: 7px 11px;
  }
  .unit-row {
    grid-template-columns: 27px minmax(0, 1fr) auto;
    gap: 6px 9px;
    padding: 11px 10px;
  }
  .grade {
    width: 27px;
    height: 29px;
    font-size: 1.1rem;
  }
  .unit-id {
    gap: 8px;
  }
  .unit-id img {
    width: 34px;
    height: 34px;
  }
  .pick {
    grid-column: 2/4;
    grid-row: 2;
  }
  .obtain {
    grid-column: 3;
    grid-row: 1;
    font-size: 0.8rem;
  }
  .pick small {
    font-size: 0.71rem;
  }
  .rail {
    grid-template-columns: 1fr;
  }
  .definitions {
    gap: 10px;
  }
  .detail {
    padding-top: 12px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-head {
    margin-top: 12px;
    gap: 11px;
  }
  .detail-head img {
    width: 48px;
    height: 48px;
  }
  .detail h1 {
    font-size: 1.9rem;
  }
  .lead {
    font-size: 1rem;
  }
  .detail-grid {
    margin-top: 14px;
  }
  .detail article #obtain {
    padding: 14px;
  }
  .detail .side-card dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .detail .side-card dt {
    margin: 0;
  }
  footer a {
    margin-left: 0;
  }
}
.swaps {
  display: flex;
  gap: 5px 16px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.swaps a {
  color: #ffe5c1;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration-color: #a79a99;
  text-underline-offset: 3px;
}
.swaps a:hover {
  color: white;
}
.swaps a:focus-visible {
  outline-color: white;
}
@media (max-width: 620px) {
  .swaps {
    gap: 3px 14px;
    margin-top: 7px;
  }
  .swaps a {
    font-size: 0.75rem;
  }
}
@media (max-width: 355px) {
  .wrap {
    width: calc(100% - 20px);
  }
  .switch span {
    padding: 6px;
  }
  .board form {
    gap: 4px;
  }
  .mast nav {
    gap: 8px;
  }
  .unit-id .emblem {
    width: 29px;
    height: 29px;
  }
}
