@charset "utf-8";

@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&family=Noto+Sans+TC:wght@300;400;500;600;700&family=Roboto:wght@300;400;500;600;700&display=swap");

:root {
	--font-en: "Roboto", sans-serif;
	--font-tc: "Noto Sans TC", sans-serif;
	--font-sc: "Noto Sans SC", sans-serif;
	--font-stack: var(--font-en), var(--font-tc), var(--font-sc), sans-serif;

	--color-gray: #DBE0E4;

	--color-brand: #C33B32;
	--color-text: #3F4C54;
	--color-text-dark: #000;
	--color-text-secondary: #3F4C54;
	--color-text-muted: #3F4C54;
	--color-border: #eeeeee;
	--color-border-light: #f5f5f5;
	--color-bg-hover: #fafafa;
	--color-tab-inactive: #ffffff;
	--color-tab-active-bg: #DBE0E4;
	--color-tab-active-text: #3F4C54;
	--color-tab-inactive-text: #3F4C54;
	--color-link: #007cd3;
	--color-rise: #2CBC05;
	--color-drop: #C33B32;
	--color-footer-text: #bbbbbb;
	--color-footer-muted: #dddddd;
	--color-border: #DBE0E4;

	--font-size-xs: 11px;
	--font-size-sm: 12px;
	--font-size-base: 13px;
	--font-size-md: 14px;
	--font-size-lg: 16px;
	--font-size-default: 14px;

	--line-height-tight: 1.25;
	--line-height-base: 1.4;
	--line-height-relaxed: 1.5;

	--space-xxs: 4px;
	--space-xs: 6px;
	--space-sm: 10px;
	--space-md: 14px;
	--space-lg: 18px;

	--radius-pill: 999px;
	--row-height: 28px;
}

/* Scrollbar */
::-webkit-scrollbar {
	width: 5px;
}

::-webkit-scrollbar-track {
	background: #D9D9D9;
}

::-webkit-scrollbar-thumb {
	background: #3F4C54;
}

::-webkit-scrollbar-thumb:hover {
	background: #000000;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
	margin: 0;
	padding: 0;
}

body {
	position: relative;
	padding: 0;
	margin: 0;
	font-family: var(--font-stack);
	font-size: var(--font-size-base);
	line-height: var(--line-height-base);
	color: var(--color-text);
	background: #ffffff;
}

html[lang="en"] body,
html[lang="en-US"] body {
	font-family: var(--font-en), var(--font-tc), var(--font-sc), sans-serif;
}

html[lang="zh-Hant"] body,
html[lang="zh-TW"] body,
html[lang="zh-HK"] body {
	font-family:  var(--font-en),var(--font-tc), sans-serif;
}

html[lang="zh-Hans"] body,
html[lang="zh-CN"] body {
	font-family:  var(--font-en),var(--font-sc), sans-serif;
}



a,
a:link,
a:active,
a:visited,
a:hover {
	text-decoration: none;
	color: var(--color-text);
}

/* ── Market news (hk_market_news) ── */

#divTabAafn,
#dbp-footer {
	overflow: hidden;
}

#divTabAafn {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	margin: 0 0 var(--space-xxs) 0;
	align-items: center;
}

#divTabAafn>a {
	display: inline-flex;
	align-items: center;
	padding: 0px 14px;
	height: 31px;
	border-radius: 0;
	font-size: var(--font-size-default);
	font-weight: 500;
	color: var(--color-tab-inactive-text);
	background: var(--color-tab-inactive);
	transition: background 0.2s ease, color 0.2s ease;
}

#divTabAafn>a:hover {
	background: var(--color-tab-active-bg);
	color: var(--color-tab-active-text);
}

#divTabAafn>a.on {
	background: var(--color-tab-active-bg);
	color: var(--color-tab-active-text);
	cursor: default;
}

#divTabAafn>a:not(.on) {
	cursor: pointer;
}

#tabHolder {
	height: calc(100vh - 72px);
	overflow: auto;
	position: relative;
	margin: 0 0 var(--space-md);
}

#tabHolder>ul:not(.on) {
	display: none;
}

#tabHolder>ul.on {
	display: block;
}

#tabHolder>ul,
#tabHolder>ul li {
	display: block;
}

#tabHolder>ul {
	padding: 0;
	margin: 0;
	width: 100%;
	list-style: none;
}

#tabHolder>ul li {
	width: 100%;
	padding: 0;
}

#tabHolder>ul li>a {
	display: block;
	padding: 15px 5px 5px 5px;
	font-size: var(--font-size-default);
	font-weight: 400;
	line-height: var(--line-height-relaxed);
	color: var(--color-text-muted);
	transition: background 0.15s ease;
}

#tabHolder>ul li:not(:last-child)>a {
	border-bottom: 1px solid var(--color-border);
}

#tabHolder>ul li:hover>a {
	background: var(--color-gray);
}

#tabHolder>ul li>a>span {
	display: block;
	margin-bottom: var(--space-xs);
	font-size: var(--font-size-default);
	font-weight: 300;
	line-height: var(--line-height-tight);
	color: var(--color-text-dark);
}

/* ── HK indices chart (index_graph) ── */

h6 {
	margin: 0 0 var(--space-sm);
	font-size: var(--font-size-lg);
	font-weight: 500;
	line-height: var(--line-height-tight);
	color: var(--color-brand);
	text-align: left;
	text-transform: none;
	display: inline-block;
}

h6>small {

	font-size: var(--font-size-lg);
	font-weight: 300;
	line-height: var(--line-height-tight);
	color: var(--color-text-secondary);
	display: inline-block;
	margin-left: var(--space-sm);
}

h5 {
	display: flex;
	flex-wrap: wrap;
	gap: 64px;
	margin: 0 0 20px;
	font-size: var(--font-size-lg);
	font-weight: 600;
	line-height: var(--line-height-tight);
	text-align: left;
	text-transform: none;
}

h5>a {
	display: inline-block;
	width: auto;
	min-width: 0;
	font-size: var(--font-size-lg);
	font-weight: 500;
	text-align: left;
	color: var(--color-text-secondary);
	transition: color 0.2s ease;
}

h5>a:hover {
	color: var(--color-text);
}

h5>a.on {
	font-weight: 600;
	color: var(--color-brand);
}

.div_graph {
	display: none;
}

#HSI.div_graph {
	display: block;
}

.div_graph strong {
	display: inline-block;
	font-size: 28px;
	font-weight: 400;
	line-height: 1;
	color: var(--color-text);
	vertical-align: middle;
}

.div_graph small {
	display: inline-block;
	position: relative;
	margin-left: 20px;
	padding-left: 15px;
	font-size: var(--font-size-default);
	font-weight: 300;
	vertical-align: middle;
}

.div_graph small.drop {
	color: var(--color-drop);
}

.div_graph small.drop::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 0;
	height: 0;
	border-left: 5.5px solid transparent;
	border-right: 5.5px solid transparent;
	border-top: 10px solid currentColor;
	transform: translateY(-50%);
}

.div_graph small.rise {
	color: var(--color-rise);
}

.div_graph small.rise::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 0;
	height: 0;
	border-left: 5.5px solid transparent;
	border-right: 5.5px solid transparent;
	border-bottom: 10px solid currentColor;
	transform: translateY(-50%);
}

.div_graph img {
	display: block;
	width: 100%;
	height: auto;
	margin: var(--space-sm) auto var(--space-md);
}

/* ── Top 10 turnover table ── */

#HK-indices {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	table-layout: fixed;
}

#HK-indices tr>td {
	height: 28px;
	padding: 5px 10px;
	font-size: var(--font-size-sm);
	line-height: 1;
	color: var(--color-text-secondary);
	white-space: nowrap;
	vertical-align: middle;
	font-weight: 300;
}

#HK-indices tbody tr:nth-child(even) {
	background: var(--color-gray);
}

#HK-indices tbody tr>td:nth-child(1) {
	width: 60px
} 

#HK-indices tbody tr>td:nth-child(2) {
	overflow: hidden;
	text-overflow: ellipsis;
	width: auto;
}

#HK-indices tbody tr>td:nth-child(3) {
	text-align: left;
	width: 80px
}

#HK-indices tbody tr>td:nth-child(4) {
	position: relative;
	text-align: left;
	width: 80px;
}

#HK-indices tbody tr>td:nth-child(4).drop,
#HK-indices tbody tr>td:nth-child(4).rise {
	padding-left: 1em;
}

#HK-indices tbody tr>td:nth-child(4).drop {
	color: var(--color-drop);
}

#HK-indices tbody tr>td:nth-child(4).drop .chng-span::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 8px solid currentColor;
	transform: translateY(-50%);
}

#HK-indices tbody tr>td:nth-child(4).rise {
	color: var(--color-rise);
}

#HK-indices tbody tr>td:nth-child(4).rise .chng-span::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-bottom: 8px solid currentColor;
	transform: translateY(-50%);
}

#HK-indices tfoot tr>td {
	padding: var(--space-sm) var(--space-sm) 0;
	font-size: var(--font-size-xs);
	color: var(--color-text-muted);
}
.chng-span {
	display: inline-block;
	position: relative;
	padding-left: 14px;
}
/* ── Footer (all widgets) ── */

.dbp-footer {
	position: absolute;
	bottom: var(--space-md);
	left: 0;
	height: 14px;
	font-size: var(--font-size-sm);
	line-height: 14px;
	color: var(--color-text-secondary);
	font-weight: 300;
}

.dbp-footer.static{
	margin-top: var(--space-sm);
	position: static;
}

.dbp-footer a,
.dbp-footer a:link,
.dbp-footer a:active,
.dbp-footer a:visited {
	color: var(--color-text-secondary);
	font-weight: 500;
}

.dbp-footer a:hover {
	text-decoration: underline;	
}

