/*
 * Nexus Destiny portal design system.
 *
 * Original Nexus Destiny presentation layer. It normalizes layout, typography,
 * controls and content surfaces without changing MyAAC route contracts.
 */

:root {
	--nx-ink: #33271c;
	--nx-ink-soft: #6f5b48;
	--nx-paper: #f6ead4;
	--nx-paper-soft: #fff9ed;
	--nx-paper-deep: #e5cfaa;
	--nx-line: #b99a70;
	--nx-line-strong: #8a6740;
	--nx-green: #24564f;
	--nx-green-strong: #153d39;
	--nx-green-deep: #0d2b2a;
	--nx-gold: #d7aa50;
	--nx-gold-soft: #f0d390;
	--nx-danger: #9f3029;
	--nx-success: #2f7653;
	--nx-focus: #2d8292;
	--nx-radius-sm: 5px;
	--nx-radius-md: 9px;
	--nx-radius-lg: 14px;
	--nx-control-height: 40px;
	--nx-action-width: 135px;
	--nx-shadow-sm: 0 3px 10px rgba(24, 14, 8, .16);
	--nx-shadow-md: 0 12px 32px rgba(8, 16, 18, .26);
	--nx-font-ui: Inter, Aptos, "Segoe UI", Arial, sans-serif;
	--nx-font-display: Georgia, "Times New Roman", serif;
}

html {
	min-width: 0;
	scroll-behavior: smooth;
}

body.nexus-site {
	min-width: 0;
	min-height: 100vh;
	background-color: #061421;
	color: var(--nx-ink);
	font-family: var(--nx-font-ui);
	font-size: 14px;
	line-height: 1.5;
}

body.nexus-site::before {
	position: fixed;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(90deg, rgba(3, 12, 20, .58), transparent 24%, transparent 76%, rgba(3, 12, 20, .62)),
		linear-gradient(180deg, rgba(4, 14, 22, .12), rgba(4, 14, 22, .5));
	content: "";
	pointer-events: none;
}

.nexus-site *,
.nexus-site *::before,
.nexus-site *::after {
	box-sizing: border-box;
}

.nexus-site img {
	max-width: 100%;
}

.nexus-skip-link {
	position: fixed;
	top: 10px;
	left: 50%;
	z-index: 100000;
	padding: 10px 16px;
	border: 1px solid var(--nx-gold);
	border-radius: var(--nx-radius-sm);
	background: var(--nx-green-deep);
	color: #fff8e8;
	font: 700 13px var(--nx-font-ui);
	text-decoration: none;
	transform: translate(-50%, -150%);
	transition: transform .18s ease;
}

.nexus-skip-link:focus {
	transform: translate(-50%, 0);
}

#ArtworkHelper {
	min-width: 0;
	height: auto;
	min-height: 100vh;
}

#Bodycontainer {
	display: block;
	width: min(100%, 1480px);
	min-width: 0;
	max-width: 1480px;
	height: auto;
	min-height: 100vh;
	margin: 0 auto;
	padding: 0 22px 72px;
}

#NexusMobileNav {
	display: none;
}

#ContentRow {
	top: 154px;
	display: grid;
	grid-template-columns: 180px minmax(540px, 1fr) 180px;
	gap: 18px;
	align-items: start;
}

#MenuColumn,
#ContentColumn,
#ThemeboxesColumn {
	position: relative;
	top: auto;
	right: auto;
	left: auto;
	width: auto;
	min-width: 0;
	margin: 0;
}

#MenuColumn {
	font-family: var(--nx-font-ui);
}

#LeftArtwork {
	display: flex;
	height: 128px;
	left: 0;
	top: -136px;
	width: 180px;
}

.nexus-brand-mark {
	align-items: center;
	color: #fff4db !important;
	display: inline-flex;
	gap: 10px;
	text-decoration: none !important;
}

.nexus-brand-mark--desktop {
	align-self: center;
	filter: drop-shadow(0 3px 7px rgba(0, 0, 0, .72));
	justify-content: center;
	width: 100%;
}

.nexus-brand-rune {
	background:
		radial-gradient(circle at center, #f4dda1 0 9%, transparent 10%),
		conic-gradient(from 45deg, #c9a251, #6fb1a0, #d7b662, #376f67, #c9a251);
	border: 2px solid #e5c97e;
	box-shadow: inset 0 0 0 5px #143c37, 0 0 15px rgba(127, 203, 182, .32);
	clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
	flex: 0 0 42px;
	height: 42px;
transform: rotate(45deg);
}

.nexus-brand-copy {
	display: flex;
	flex-direction: column;
	line-height: 1;
}

.nexus-brand-copy strong {
	color: #fff4db;
	font: 700 23px/1 var(--nx-font-display);
	letter-spacing: -.025em;
	text-shadow: 0 2px 0 #071a18;
}

.nexus-brand-copy small {
	color: #d5bd85;
	font: 700 8px/1.4 var(--nx-font-ui);
	letter-spacing: .1em;
	margin-top: 5px;
	text-transform: uppercase;
}

#ContentColumn:focus {
	outline: none;
}

#ThemeboxesColumn {
	text-align: center;
}

#Menu,
#Loginbox,
.SmallMenuBox,
#Themeboxes {
	filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .24));
}

#Menu {
	left: 0;
}

.Submenu {
	border-right: 1px solid rgba(218, 188, 126, .28);
	border-left: 1px solid rgba(218, 188, 126, .28);
	background: linear-gradient(180deg, rgba(13, 46, 43, .98), rgba(10, 35, 34, .98));
}

.SubmenuitemLabel {
	min-height: 25px;
	padding: 4px 7px 4px 22px;
	border-bottom-color: rgba(150, 195, 185, .24);
	font: 600 12px/16px var(--nx-font-ui);
	transition: background-color .16s ease, color .16s ease, padding-left .16s ease;
}

.Submenuitem:hover .SubmenuitemLabel,
.Submenuitem:focus-within .SubmenuitemLabel {
	padding-left: 26px;
	background: rgba(255, 255, 255, .065);
	color: #fff8e9;
}

.Content {
	top: 0;
	width: 100%;
}

.Content .Box {
	margin: 0 0 16px;
	border: 0;
	border-radius: var(--nx-radius-md);
	background: transparent;
	box-shadow: var(--nx-shadow-md);
	color: var(--nx-ink);
	overflow: hidden;
}

.Content .Box > .Corner-tl,
.Content .Box > .Corner-tr,
.Content .Box > .CornerWrapper-b,
.Content .Box > .Border_1 {
	display: none;
}

.Content .Box > .BorderTitleText {
	position: relative;
	height: 42px;
	border: 1px solid #0b2928;
	border-bottom: 0;
	border-radius: var(--nx-radius-md) var(--nx-radius-md) 0 0;
	background:
		linear-gradient(90deg, rgba(255, 255, 255, .035), transparent 50%),
		linear-gradient(180deg, #2a6258, #173f3b) !important;
	box-shadow: inset 0 1px rgba(255, 255, 255, .12);
}

.Content .Box > .Title {
	top: 7px;
	left: 15px;
	height: auto;
	max-width: calc(100% - 30px);
	padding: 0 !important;
	color: #f7e7c5 !important;
	font: 700 21px/28px var(--nx-font-display) !important;
	letter-spacing: .01em;
	text-shadow: 0 2px 0 rgba(0, 0, 0, .42);
}

.Content .Border_2,
.Content .Border_3 {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}

.Content .BoxContent,
.Content #News .BoxContent {
	min-height: 0;
	height: auto;
	padding: 18px;
	border: 1px solid var(--nx-line-strong);
	border-top: 0;
	border-radius: 0 0 var(--nx-radius-md) var(--nx-radius-md);
	background:
		linear-gradient(rgba(255, 250, 238, .9), rgba(244, 229, 201, .94)),
		var(--nx-paper) !important;
	color: var(--nx-ink);
	font: 13px/1.55 var(--nx-font-ui);
}

.Content .BoxContent td,
.Content .BoxContent th,
.Content .BoxContent p,
.Content .BoxContent li {
	font-family: var(--nx-font-ui);
}

.Content .BoxContent td {
	color: var(--nx-ink);
	font-size: 13px;
}

.Content a {
	color: #145d70;
	font-family: inherit;
	font-weight: 700;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.Content a:hover {
	color: #0c4050;
	font-family: inherit;
	text-decoration: underline;
}

.Content :where(
	input:not([type]),
	input[type="date"],
	input[type="datetime-local"],
	input[type="email"],
	input[type="month"],
	input[type="number"],
	input[type="password"],
	input[type="search"],
	input[type="tel"],
	input[type="text"],
	input[type="time"],
	input[type="url"],
	input[type="week"],
	select,
	textarea
) {
	min-height: var(--nx-control-height);
	max-width: 100%;
	padding: 8px 11px;
	border: 1px solid #9b805d;
	border-radius: var(--nx-radius-sm);
	background: var(--nx-paper-soft);
	box-shadow: inset 0 1px 2px rgba(56, 34, 14, .08);
	color: #2d251d;
	font: 13px/1.4 var(--nx-font-ui);
	transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.Content :where(
	input:not([type]),
	input[type="date"],
	input[type="datetime-local"],
	input[type="email"],
	input[type="month"],
	input[type="number"],
	input[type="password"],
	input[type="search"],
	input[type="tel"],
	input[type="text"],
	input[type="time"],
	input[type="url"],
	input[type="week"],
	select,
	textarea
):focus,
.Content button:focus-visible,
.Content a:focus-visible,
.Submenu a:focus-visible {
	outline: 3px solid rgba(45, 130, 146, .34);
	outline-offset: 2px;
}

.Content :where(
	input:not([type]),
	input[type="date"],
	input[type="datetime-local"],
	input[type="email"],
	input[type="month"],
	input[type="number"],
	input[type="password"],
	input[type="search"],
	input[type="tel"],
	input[type="text"],
	input[type="time"],
	input[type="url"],
	input[type="week"],
	select,
	textarea
):focus {
	border-color: var(--nx-focus);
	background: #fffdf7;
	box-shadow: 0 0 0 3px rgba(45, 130, 146, .16);
}

.Content input[type="checkbox"],
.Content input[type="radio"] {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--nx-green);
}

.Content button:not([class]),
.Content button.account-submit,
.Content input[type="submit"]:not(.BigButtonText) {
	min-height: 40px;
	padding: 9px 16px;
	border: 1px solid #123a36;
	border-radius: var(--nx-radius-sm);
	background: linear-gradient(#327067, #194942);
	box-shadow: inset 0 1px rgba(255, 255, 255, .14), 0 3px 8px rgba(17, 46, 42, .2);
	color: #fff8e9;
	font: 700 12px var(--nx-font-ui);
	cursor: pointer;
}

.Content button:not([class]):hover,
.Content button.account-submit:hover,
.Content input[type="submit"]:not(.BigButtonText):hover {
	background: linear-gradient(#3b7d72, #20574f);
}

/*
 * Adapter for MyAAC's shared action-button contract. The legacy component uses
 * a submit input layered over GIFs; these rules keep that stable markup while
 * preventing form-field styles and the old eight-direction text outline from
 * leaking into actions.
 */
.Content .BigButton {
	position: relative;
	z-index: auto;
	display: inline-block;
	width: var(--nx-action-width);
	max-width: 100%;
	height: var(--nx-control-height);
	background-image: none !important;
}

.Content .BigButton > div {
	width: 100%;
	height: 100%;
}

.Content .BigButtonOver {
	display: none;
}

.Content .BigButtonText {
	position: relative;
	top: auto;
	left: auto;
	z-index: 1;
	display: block;
	width: 100%;
	height: var(--nx-control-height);
	min-height: var(--nx-control-height);
	margin: 0;
	padding: 8px 14px;
	border: 1px solid #123a36;
	border-radius: var(--nx-radius-sm);
	background: linear-gradient(#327067, #194942);
	box-shadow: inset 0 1px rgba(255, 255, 255, .14), 0 3px 8px rgba(17, 46, 42, .2);
	color: #fff8e9;
	font: 700 12px/1.2 var(--nx-font-ui);
	text-align: center;
	text-shadow: none;
	cursor: pointer;
	appearance: none;
	transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.Content .BigButtonText:hover {
	top: auto;
	left: auto;
	border-color: #1b504a;
	background: linear-gradient(#3b7d72, #20574f);
	transform: translateY(-1px);
}

.Content .BigButtonText:active {
	box-shadow: inset 0 2px 4px rgba(7, 28, 25, .24);
	transform: translateY(0);
}

.Content .BigButtonText:focus-visible {
	outline: 3px solid rgba(45, 130, 146, .34);
	outline-offset: 2px;
}

.Content .BigButtonText:disabled {
	border-color: #817665;
	background: #9f9584;
	box-shadow: none;
	color: #f4eee4;
	cursor: not-allowed;
	transform: none;
}

.Content .BigButton--green .BigButtonText {
	border-color: #20523e;
	background: linear-gradient(#3b7958, #24583f);
}

.Content .BigButton--green .BigButtonText:hover {
	background: linear-gradient(#478b68, #2d694c);
}

.Content .BigButton--red .BigButtonText {
	border-color: #68231f;
	background: linear-gradient(#b4473f, #812b27);
}

.Content .BigButton--red .BigButtonText:hover {
	background: linear-gradient(#c8584f, #95342f);
}

.nexus-account-login {
	margin: 0;
	padding: 0;
}

.nexus-login-actions {
	display: grid;
	gap: 4px;
	justify-items: end;
}

.Content .nexus-login-action-link {
	display: block;
	text-decoration: none;
}

.Content .FormFieldError,
.Content .red {
	color: var(--nx-danger) !important;
	font-weight: 700;
}

.TableContainer,
.TableContentContainer {
	border-color: var(--nx-line) !important;
	border-radius: var(--nx-radius-sm);
	background: var(--nx-paper-deep);
	overflow: hidden;
}

.TableContainer .CaptionContainer,
.TableContainer .CaptionContainer .CaptionInnerContainer {
	background: linear-gradient(180deg, #32675e, #1d4742) !important;
}

.TableContainer .Odd,
.Content .BoxContent .Odd {
	background-color: #f8edd9;
}

.TableContainer .Even,
.Content .BoxContent .Even {
	background-color: #ead7b8;
}

.InfoBar {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 40px;
	top: 0;
	margin: 0;
	padding: 0 12px;
	font-family: var(--nx-font-ui);
}

.InfoBar > span:last-child {
	margin-left: auto !important;
}

.InfoBarNumbers {
	top: 0;
}

.InfoBarSmallElement,
.InfoBarLinks {
	font: 700 11px var(--nx-font-ui);
}

.InfoBarBigLogo {
	width: 15px;
	height: 15px;
	object-fit: contain;
}

.Content #News .NewsHeadlineBackground,
.Content #FeaturedArticle .NewsHeadlineBackground,
.Content #NewsArchive .NewsHeadlineBackground {
	height: 34px;
	margin: 0 0 10px;
	border: 1px solid #4d251f;
	border-radius: var(--nx-radius-sm);
	background: linear-gradient(180deg, #8d2824, #5e1717) !important;
	box-shadow: inset 0 1px rgba(255, 255, 255, .12);
}

.Content #News .NewsHeadlineDate,
.Content #FeaturedArticle .NewsHeadlineDate,
.Content #NewsArchive .NewsHeadlineDate {
	top: 10px;
	font: 700 9px var(--nx-font-ui);
}

.Content #News .NewsHeadlineText,
.Content #FeaturedArticle .NewsHeadlineText,
.Content #NewsArchive .NewsHeadlineText {
	top: 8px;
	font: 700 13px var(--nx-font-display);
}

.nexus-ranking-box {
	width: 180px !important;
}

#Footer {
	padding: 18px 12px 28px;
	color: rgba(255, 255, 255, .8);
	font: 11px/1.5 var(--nx-font-ui);
	text-shadow: 0 1px 2px #000;
}

.scrollToTop {
	position: fixed;
	right: 12px;
	bottom: 10px;
	z-index: 50000;
	display: block;
	width: 44px;
	height: 44px;
	padding: 0 !important;
	border: 1px solid rgba(226, 192, 126, .5);
	border-radius: 50%;
	background: rgba(12, 43, 40, .9);
	box-shadow: var(--nx-shadow-sm);
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transform: translateY(8px);
	transition: opacity .16s ease, transform .16s ease;
}

.scrollToTop.is-visible {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

.scrollToTop img {
	width: 40px !important;
	height: auto;
}

@media (max-width: 1180px) {
	#Bodycontainer {
		max-width: 1040px;
	}

	#ContentRow {
		grid-template-columns: 180px minmax(0, 1fr);
	}

	#ThemeboxesColumn {
		grid-column: 1 / -1;
		padding-left: 198px;
	}

	#RightArtwork {
		display: none;
	}

	#Themeboxes {
		display: flex;
		flex-wrap: wrap;
		gap: 12px;
		justify-content: center;
	}
}

@media (max-width: 780px) {
	body.nexus-site {
		background-position: center top !important;
		background-attachment: scroll !important;
	}

	#Bodycontainer {
		padding: 0 12px 48px;
	}

	#NexusMobileNav {
		position: relative;
		top: 10px;
		z-index: 1000;
		display: flex;
		min-height: 62px;
		align-items: center;
		gap: 8px;
		padding: 8px 10px;
		border: 1px solid rgba(215, 170, 80, .62);
		border-radius: var(--nx-radius-md);
		background: rgba(10, 43, 41, .96);
		box-shadow: var(--nx-shadow-md);
		backdrop-filter: blur(10px);
	}

	.nexus-mobile-brand {
		display: flex;
		flex: 0 0 auto;
		align-items: center;
	}

	.nexus-mobile-brand .nexus-brand-rune { flex-basis: 28px; height: 28px; }
	.nexus-mobile-brand .nexus-brand-copy strong { font-size: 15px; }
	.nexus-mobile-brand .nexus-brand-copy small { font-size: 6px; margin-top: 3px; }

	.nexus-mobile-actions {
		display: flex;
		min-width: 0;
		align-items: center;
		gap: 6px;
		margin-left: auto;
	}

	.nexus-mobile-actions a,
	.nexus-mobile-menu > summary {
		min-height: 36px;
		padding: 9px 10px;
		border: 1px solid rgba(240, 211, 144, .42);
		border-radius: var(--nx-radius-sm);
		background: rgba(255, 255, 255, .055);
		color: #fff8e9;
		font: 700 11px/16px var(--nx-font-ui);
		text-decoration: none;
		white-space: nowrap;
	}

	.nexus-mobile-actions a:hover,
	.nexus-mobile-menu > summary:hover {
		background: rgba(255, 255, 255, .12);
		color: #fff;
	}

	.nexus-mobile-menu {
		position: relative;
		flex: 0 0 auto;
	}

	.nexus-mobile-menu > summary {
		list-style: none;
		cursor: pointer;
	}

	.nexus-mobile-menu > summary::-webkit-details-marker {
		display: none;
	}

	.nexus-mobile-menu[open] > summary {
		background: var(--nx-gold);
		color: var(--nx-green-deep);
	}

	.nexus-mobile-menu__panel {
		position: absolute;
		top: calc(100% + 9px);
		right: 0;
		display: grid;
		width: min(520px, calc(100vw - 24px));
		max-height: min(68vh, 560px);
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
		padding: 14px;
		border: 1px solid var(--nx-line-strong);
		border-radius: var(--nx-radius-md);
		background: #f8ecd7;
		box-shadow: var(--nx-shadow-md);
		overflow-y: auto;
	}

	.nexus-mobile-menu__panel section {
		min-width: 0;
	}

	.nexus-mobile-menu__panel h2 {
		margin: 0 0 5px;
		padding-bottom: 4px;
		border-bottom: 1px solid var(--nx-line);
		color: var(--nx-green-strong);
		font: 700 13px var(--nx-font-display);
	}

	.nexus-mobile-menu__panel a {
		display: block;
		padding: 5px 3px;
		color: #4c3724;
		font: 600 11px var(--nx-font-ui);
		text-decoration: none;
	}

	.nexus-mobile-menu__panel a:hover {
		color: #116176;
		text-decoration: underline;
	}

	#ContentRow {
		top: 24px;
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}

	#MenuColumn {
		display: none;
	}

	#ContentColumn {
		grid-row: 1;
	}

	#ThemeboxesColumn {
		grid-row: 2;
		grid-column: 1;
		padding-left: 0;
	}

	.Content .BoxContent,
	.Content #News .BoxContent {
		padding: 12px;
	}

	.Content .Box > .Title {
		font-size: 18px !important;
	}

	.InfoBar {
		gap: 4px;
		overflow-x: auto;
	}

	.InfoBar > span:last-child {
		flex: 0 0 auto;
	}

	.nexus-character-search__fields,
	.nexus-character-search__fields > tbody,
	.nexus-character-search__fields > tbody > tr {
		display: block;
		width: 100%;
	}

	.nexus-character-search__fields > tbody > tr > td {
		display: block;
		width: 100% !important;
		padding: 4px 0;
	}

	.nexus-character-search__fields label {
		display: block;
	}

	.nexus-character-search__fields input[type="search"],
	.nexus-character-search__fields .BigButton {
		width: 100% !important;
	}

	.nexus-account-login .TableContent > tbody > tr {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: 10px;
	}

	.nexus-account-login .TableContent > tbody > tr > td,
	.nexus-account-login #LoginFormButtonCell {
		display: block;
		width: 100%;
		padding-right: 0;
	}

	.nexus-login-actions {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.nexus-login-actions .BigButton,
	.nexus-login-action-link {
		width: 100%;
	}
}

@media (max-width: 520px) {
	.nexus-mobile-brand .nexus-brand-copy small { display: none; }
	.nexus-mobile-brand .nexus-brand-rune { flex-basis: 24px; height: 24px; }
	.nexus-mobile-brand .nexus-brand-copy strong { font-size: 13px; }
	.nexus-mobile-actions a:first-child {
		display: none;
	}

	.nexus-mobile-menu__panel {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
	}
}
