:root {
	--bground: rgba(250, 250, 250, 1);
	--mground: rgba(200, 200, 200, 1);
	--fground: rgba(25, 25, 25, 1);
	--brand: rgba(40, 150, 190, 1);
	--normal: 300;
	--bold: 500;
}

@media (prefers-color-scheme: dark) {
	:root {
		--fground: rgba(250, 250, 250, 1);
		--mground: rgba(100, 100, 100, 1);
		--bground: rgb(0, 0, 0);
		--brand: rgba(40, 150, 190, 1);
		--normal: 300;
		--bold: 500;
	}
}


*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	border: 0;
	box-sizing: border-box;
	outline: none;
}

html {
	font-size: 62.5%;
	scroll-behavior: smooth;
}

body {
	background: var(--bground);
	font-family: 'Share Tech Mono', monospace;
	color: #5E7362;
	font-size: 1.6rem;
	line-height: 1.25;
	width: 100%;
	overflow-x: hidden;
}

.wrap {
	min-height: 100vh;
	width: 100%;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
}

p {}

a {
	text-decoration: none;
	color: var(--brand);
}

a:hover,
a:active,
a:focus {
	background: var(--brand);
	color: var(--bground);
}

ul {
	list-style: none;
}

li {}

/* Logo sizing: responsive with max-width */
header img {
	width: 100%;
	max-width: 35rem;
	height: auto;
	display: block;
	margin: 0 auto;
	padding: 0 1rem;
}

.wrap>* {
	padding: .5rem;
}

header {
	width: 100%;
	text-align: center;
	padding: 1rem;
}

header>* {
	margin: 0.8rem auto;
}

h1 {
	width: 18rem;
}

h1 a {
	display: block;
	line-height: 0;
}

h1 a:hover,
header h1 a:active,
header h1 a:focus {}

h2 {
	text-transform: uppercase;
	color: var(--brand);
	font-size: 2rem;
}

h3 {
	font-size: 1.4rem;
}

main {
	width: 100%;
	flex: 1;
}

details summary {
	cursor: pointer;
	width: 100%;
	display: flex;
	justify-content: space-between;
	flex-direction: row;
	align-items: center;
	border-bottom: 1px dashed var(--mground);
	padding: 2rem;
	font-weight: var(--bold);
	color: var(--brand);
	font-size: 2rem;
}

details summary:hover,
details summary:active,
details summary:focus {
	background: var(--brand);
	color: var(--fground);
}

details[open]>summary {
	background: var(--brand);
	color: var(--bground);
	border-bottom: border-bottom 1px dashed var(--mground);
}

details summary span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: calc(100% - 12rem);
}

details[open]>summary span {
	max-width: 100%;
}

details summary b {}

details[open]>summary b {
	display: none;
}

details summary i {
	color: var(--fground);
	opacity: 0.25;
	display: inline-block;
	width: 2rem;
	height: 2rem;
	overflow: hidden;
	margin: 0 .5rem;
}

details summary i svg {
	width: 100%;
	height: auto;
}

details summary i.yes {
	opacity: 1;
}

details div {
	padding: 2rem;
	border-bottom: .1rem solid var(--fground);
	color: var(--mground);
	font-size: 1.8rem;
	color: var(--fground);
}

details div p {
	padding-bottom: 1rem;
}

details div em {
	display: block;
	width: 100%;
	text-align: right;
}

details p span {
	width: 3rem;
	height: 3rem;
}

details p span a {
	font-size: 3rem;
	display: block;
	width: 3rem;
	height: 3rem;
	text-align: center;
	background: var(--mground);
	color: var(--bground);
}

footer {
	text-align: center;
	border-top: .1rem solid var(--fground);
	margin: 2rem auto;
	padding: 1.5rem;
	width: 100%;
}

/* Table container: responsive and scrollable */
#ipo-table-container {
	width: 100%;
	padding: 0 0.5rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 1.3rem;
	min-width: 100%;
}

th,
td {
	padding: 0.8rem 0.6rem;
	text-align: left;
	border-bottom: 1px dashed var(--mground);
	word-break: break-word;
	overflow-wrap: break-word;
}

thead {
	background: rgba(40, 150, 190, 0.05);
	position: sticky;
	top: 0;
	z-index: 10;
}

thead th {
	font-weight: var(--bold);
	color: var(--brand);
	padding: 0.8rem 0.6rem;
	white-space: nowrap;
}

tbody tr {
	transition: background-color 0.2s ease;
}

tbody tr:hover {
	background-color: rgba(40, 150, 190, 0.05);
}

.highlight-top-5 {
	background-color: rgba(40, 150, 190, 0.15) !important;
}

.highlight-active {
	background-color: rgba(0, 255, 0, 0.1) !important;
}

/* Tablet screens: 768px and below */
@media screen and (max-width: 768px) {
	html {
		font-size: 58%;
	}

	.wrap>* {
		padding: 1.2rem;
	}

	header {
		padding: 0.8rem;
	}

	header>* {
		margin: 0.6rem auto;
	}

	h2 {
		font-size: 1.6rem;
	}

	h3 {
		font-size: 1.2rem;
	}

	table {
		font-size: 1.2rem;
	}

	th,
	td {
		padding: 0.7rem 0.5rem;
	}

	#ipo-table-container {
		margin-top: 1rem;
	}
}

/* Mobile screens: 480px and below */
@media screen and (max-width: 480px) {
	html {
		font-size: 55%;
	}

	body {
		font-size: 1.4rem;
	}

	.wrap>* {
		padding: 1rem;
	}

	header {
		padding: 0.6rem;
	}

	header img {
		max-width: 100%;
	}

	header>* {
		margin: 0.5rem auto;
	}

	h2 {
		font-size: 1.4rem;
	}

	h3 {
		font-size: 1.1rem;
	}

	main {
		font-size: 1.3rem;
	}

	table {
		font-size: 1.1rem;
	}

	th,
	td {
		padding: 0.6rem 0.4rem;
		border-bottom: 1px solid var(--mground);
	}

	thead th {
		padding: 0.6rem 0.4rem;
		font-size: 0.9rem;
	}

	#ipo-table-container {
		margin-top: 0.8rem;
		padding: 0 0.3rem;
	}
}

/* Small mobile screens: 360px and below */
@media screen and (max-width: 360px) {
	html {
		font-size: 50%;
	}

	body {
		font-size: 1.3rem;
	}

	table {
		font-size: 1rem;
	}

	th,
	td {
		padding: 0.5rem 0.3rem;
	}

	thead th {
		padding: 0.5rem 0.3rem;
		font-size: 0.85rem;
	}
}

/* Landscape orientation adjustments */
@media screen and (max-height: 500px) and (orientation: landscape) {
	.wrap {
		min-height: auto;
	}

	header {
		padding: 0.5rem;
	}

	header img {
		max-width: 20rem;
	}

	header>* {
		margin: 0.3rem auto;
	}

	h2 {
		font-size: 1.2rem;
	}

	h3 {
		font-size: 1rem;
	}

	main {
		font-size: 1.2rem;
	}

	footer {
		margin: 0.5rem auto;
		padding: 0.8rem;
	}
}

/* Moved from index.html */
:root {
	--bg-color: #ffffff;
	--text-color: #333333;
	--header-bg: #ffffff;
	--table-bg: #ffffff;
	--border-color: #ddd;
	--highlight-bg: #e8f5e8;
	--scroll-info-bg: #f0f0f0;
}

body.dark-mode {
	--bg-color: #121212;
	--text-color: #ffffff;
	--header-bg: #1e1e1e;
	--table-bg: #1e1e1e;
	--border-color: #333;
	--highlight-bg: #2e4d2e;
	--scroll-info-bg: #2a2a2a;
}

body {
	background-color: var(--bg-color);
	color: var(--text-color);
	transition: background-color 0.3s, color 0.3s;
}

header {
	background-color: var(--header-bg);
}

.table-wrapper th,
.table-wrapper td {
	background-color: var(--table-bg);
	border-color: var(--border-color);
}

.highlight-top-5,
.highlight-active {
	background-color: var(--highlight-bg);
}

.scroll-info {
	background-color: var(--scroll-info-bg);
}

#theme-toggle {
	position: absolute;
	top: 10px;
	right: 10px;
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: var(--text-color);
	transition: color 0.3s;
}

#theme-toggle:hover {
	opacity: 0.8;
}

.element-pdf-highlight {
	outline: 3px solid #2196F3 !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.3),
		0 0 8px rgba(33, 150, 243, 0.6) !important;
	position: relative !important;
	z-index: 999999 !important;
}

.element-pdf-label {
	position: fixed !important;
	background-color: #2196F3 !important;
	color: white !important;
	padding: 4px 8px !important;
	border-radius: 4px !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
	font-size: 12px !important;
	pointer-events: none !important;
	z-index: 999999 !important;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
	max-width: 300px !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
}

.element-pdf-overlay {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	z-index: 999990 !important;
	pointer-events: none !important;
	background-color: transparent !important;
	/* Ensure no dimming */
}

.element-pdf-selected {
	position: relative !important;
	outline: 3px solid #4CAF50 !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3),
		0 0 8px rgba(76, 175, 80, 0.6) !important;
	z-index: 999998 !important;
}

.element-pdf-selected-badge {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	background-color: #4CAF50 !important;
	color: white !important;
	padding: 2px 6px !important;
	font-size: 10px !important;
	border-radius: 3px !important;
	z-index: 999999 !important;
	pointer-events: none !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.element-pdf-controls {
	position: fixed !important;
	bottom: 20px !important;
	left: 50% !important;
	transform: translateX(-50%) !important;
	background-color: #fff !important;
	border-radius: 8px !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
	padding: 12px !important;
	z-index: 9999999 !important;
	display: flex !important;
	flex-direction: column !important;
	min-width: 300px !important;
}

.element-pdf-controls-header {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	margin-bottom: 10px !important;
	padding-bottom: 10px !important;
	border-bottom: 1px solid #eee !important;
}

.element-pdf-controls-title {
	font-weight: bold !important;
	font-size: 14px !important;
	color: #333 !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.element-pdf-controls-count {
	font-size: 12px !important;
	color: #666 !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.element-pdf-controls-buttons {
	display: flex !important;
	gap: 8px !important;
	margin-top: 10px !important;
}

.element-pdf-controls-button {
	padding: 8px 16px !important;
	border-radius: 4px !important;
	border: none !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	transition: background-color 0.2s !important;
	flex: 1 !important;
}

.element-pdf-controls-button-primary {
	background-color: #2196F3 !important;
	color: white !important;
}

.element-pdf-controls-button-primary:hover {
	background-color: #1976D2 !important;
}

.element-pdf-controls-button-secondary {
	background-color: #f5f5f5 !important;
	color: #333 !important;
}

.element-pdf-controls-button-secondary:hover {
	background-color: #e0e0e0 !important;
}

.element-pdf-controls-button-danger {
	background-color: #f44336 !important;
	color: white !important;
}

.element-pdf-controls-button-danger:hover {
	background-color: #d32f2f !important;
}

.element-pdf-selected-list {
	max-height: 150px !important;
	overflow-y: auto !important;
	margin: 10px 0 !important;
	border: 1px solid #eee !important;
	border-radius: 4px !important;
	padding: 8px !important;
}

.element-pdf-selected-item {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	padding: 6px 8px !important;
	border-bottom: 1px solid #f0f0f0 !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
	font-size: 12px !important;
}

.element-pdf-selected-item:last-child {
	border-bottom: none !important;
}

.element-pdf-selected-item-text {
	flex: 1 !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
}

.element-pdf-selected-item-remove {
	background: none !important;
	border: none !important;
	color: #f44336 !important;
	cursor: pointer !important;
	font-size: 16px !important;
	padding: 0 4px !important;
}

.ipo-section {
	margin-bottom: 20px;
}

.ipo-section h3 {
	margin-top: 10px;
	margin-bottom: 5px;
	font-size: 20px;
	color: #333;
}

.ipo-section table {
	margin-bottom: 20px;
}

#ipo-table-container {
	width: 100%;
}

.table-wrapper {
	width: 100%;
	max-height: 225px;
	overflow-y: auto;
	overflow-x: auto;
}

.closed-ipo-section .table-wrapper {
	max-height: 360px;
	overflow-y: auto;
	border: 1px solid #ddd;
	border-radius: 4px;
}