/* general layout */
body {
	font-family: 'Oxanium', sans-serif;
	background: #f4f3ee;
	color: #222;
	margin: 0;
	padding: 2rem;
	font-size: 16px;
	line-height: 1.6;
}

h1 {
	text-align: center;
	font-size: 6rem;
	letter-spacing: 0.05em;
	margin-bottom: 0.75rem; /* tighten slightly if needed */
	font-weight: 700;
}

/* corner screws */
.corner {
	position: fixed;
	width: 40px;
	height: 40px;
	z-index: 999;
	pointer-events: none;
	opacity: 0.75;
	object-fit: contain;
}

.top-left {
	top: 0.75rem;
	left: 0.75rem;
}

.top-right {
	top: 0.75rem;
	right: 0.75rem;
}

.bottom-left {
	bottom: 0.75rem;
	left: 0.75rem;
}

.bottom-right {
	bottom: 0.75rem;
	right: 0.75rem;
}

/* loading spinner */
#loading-spinner {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f4f3ee;
	z-index: 1000;
}

.gear-spinner {
	width: 48px;
	height: 48px;
	border: 6px dashed #444;
	border-radius: 50%;
	animation: spin 1.5s linear infinite;
	opacity: 0.6;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* nav */
.site-nav {
	display: flex;
	justify-content: center;
	gap: 1rem;
	flex-wrap: nowrap;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
	display: none;
}

/* base style for all tabs */
.site-nav button {
	white-space: nowrap;
	flex-shrink: 0;
	background: none;
	border: none;
	cursor: pointer;
	font-family: 'Oxanium', sans-serif;
	font-size: 1rem;
	padding: 0.5rem 1rem;
	color: #333;
	border-bottom: 2px solid transparent;
	transition: all 0.2s ease;
}

/* active tab underline */
.site-nav button.active {
	border-color: #333;
	font-weight: 600;
}
/* improved sort layout */
.sort-container {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	margin: 1.5rem 0 2rem 0; /* ⬅️ top = 1.5rem, bottom = 2rem */
}

.sort-container label {
	font-weight: 600;
	font-size: 1.1rem;
}

.sort-container select {
	font-family: 'Oxanium', sans-serif;
	font-size: 1rem;
	padding: 0.4rem 0.75rem;
	border-radius: 6px;
	border: 1px solid #aaa;
	background-color: #f4f3ee;
	color: #222;
}

/* sort dropdowns */
.sort-options {
	text-align: center;
	margin-bottom: 1rem;
}

.sort-options label {
	font-weight: 600;
	margin-right: 0.5rem;
}

#sort-select,
#channel-select {
	font-family: 'Oxanium', sans-serif;
	font-size: 1rem;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	border: 1px solid #aaa;
	margin-left: 0.5rem;
}

#channel-select {
	display: none;
}

/* search bar */
.search-container {
	display: flex;
	justify-content: center;
	margin: 1.5rem 0;
}

#search-input {
	font-family: inherit;
	font-size: 1rem;
	padding: 0.5rem 1rem;
	width: 80%;
	max-width: 500px;
	border: 2px solid #444;
	border-radius: 6px;
	background-color: #fafafa;
	color: #111;
	transition: border-color 0.2s ease;
}

#search-input:focus {
	border-color: #222;
	outline: none;
}

.visually-hidden {
	position: absolute;
	left: -9999px;
}

mark {
	background-color: #ccb58f;
	color: #000000;
	padding: 0 2px;
	border-radius: 2px;
	font-weight: 500;
}

/* arena content container */
#arena-content.index {
	max-width: 1000px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	border: 1px solid #ccc;
	border-radius: 8px;
	overflow: hidden;
}

/* block row */
.index-block {
	border-bottom: 1px solid #ccc;
}

.index-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #f4f3ee;
	padding: 1rem 1.25rem;
	transition: background 0.2s ease, transform 0.2s ease;
	cursor: pointer;
	gap: 1rem;
}

.index-row:hover {
	background: #dcd8cd;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.index-year {
	width: 60px;
	font-size: 1.2rem;
	color: #444;
	text-align: left;
	padding-right: 0.5rem;
	flex-shrink: 0;
	font-weight: 500;
}

.index-left {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex: 1;
}

.index-title-group {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.index-number {
	padding: 0.1rem 0.4rem;
	border: 1px solid #ccc;
	border-radius: 0.25rem;
	font-size: 0.65rem;
	font-weight: 400;
	color: #222;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin-right: 0.5rem;
	line-height: 1;
	opacity: 0.75;
}

.index-number:hover {
	background-color: #adaaa5;
	opacity: 1;
	cursor: default;
}

.index-number:active {
	transform: translateY(1px);
	opacity: 0.9;
}

.index-title {
	font-size: 1.1rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.2;
	word-break: break-word;
	overflow-wrap: break-word;
}

.index-meta {
	font-size: 0.85rem;
	color: #666;
	font-weight: 400;
}

.index-right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	width: 180px;
	text-align: right;
	gap: 0.25rem;
}

.index-channel {
	font-size: 0.85rem;
	color: #444;
	text-transform: uppercase;
	font-weight: 600;
	letter-spacing: 0.03em;
}

/* arrow appearance */
.index-arrow {
	transition: transform 0.2s ease, opacity 0.2s ease;
	transform: translateX(0); /* ensures transform is initialized */
	font-size: 1.25rem;
	opacity: 0.3;
	padding: 0.25rem 0.5rem;
}

.index-thumbnail {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 4px;
	flex-shrink: 0;
	opacity: 0.9;
}

/* block content (hidden on load) */
.block-content {
	display: none;
	background: #fff;
	padding: 1rem 1.5rem;
	font-size: 0.95rem;
	color: #444;
}

.channel-description {
	font-size: 0.85rem;
	color: #888;
	font-style: italic;
	margin-top: 0.25rem;
}

.block-description {
	font-style: italic;
	color: #555;
	margin-bottom: 0.75rem;
}

.image-container {
	width: 100%;
	background: #eee;
	overflow: hidden;
	margin-top: 1rem;
	display: flex;
	justify-content: center;
	align-items: center;
}

.image-container img {
	max-width: 100%;
	max-height: 600px;
	height: auto;
	width: auto;
	object-fit: contain;
	display: block;
}

.block-content p {
	margin: 0;
}

.block-content a {
	color: #0097a7;
	text-decoration: none;
	word-break: break-word;
	font-weight: 500;
}

.block-content a:hover {
	text-decoration: underline;
}

/* readings/docs masonry grid layout */
#arena-content.readings-view {
	max-width: 1200px;
	margin: 0 auto;
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
	gap: 1.5rem;
	padding: 2rem 1rem;
	border: none;
	border-radius: 0;
	overflow: visible;
	flex-direction: unset !important;
}

.readings-view .index-block {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 12px;
	padding: 1.5rem;
	cursor: default;
	display: block;
	height: auto;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
	transition: all 0.3s ease;
	break-inside: avoid;
	border-bottom: 1px solid #ddd;
}

.readings-view .index-block:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	transform: translateY(-2px);
}

.readings-view .index-row {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	background: transparent;
	padding: 0;
	box-shadow: none;
	gap: 0.5rem;
	cursor: default;
}

.readings-view .index-number {
	display: none;
}

.readings-view .index-year {
	display: none;
}

.readings-view .index-thumbnail {
	display: none;
}

.readings-view .index-title {
	font-size: 1.1rem;
	font-weight: 600;
	color: #222;
	margin: 0 0 0.75rem 0;
	line-height: 1.3;
	word-break: break-word;
	overflow-wrap: break-word;
}

.readings-view .index-meta {
	font-size: 0.9rem;
	color: #555;
	margin: 0 0 0.5rem 0;
}

.readings-view .index-channel {
	font-size: 0.75rem;
	color: #888;
	font-weight: 600;
	text-transform: uppercase;
	margin: 1rem 0 0 0;
	letter-spacing: 0.05em;
	padding: 0.25rem 0.5rem;
	background: #f8f9fa;
	border-radius: 4px;
	display: inline-block;
}

.readings-view .block-content {
	display: block;
	background: transparent;
	padding: 0;
	font-size: 0.9rem;
	color: #444;
	line-height: 1.5;
	margin-top: 0.75rem;
}

.readings-view .block-content p {
	margin: 0;
}

.readings-view .block-content a {
	color: #007b8a;
	text-decoration: none;
	font-weight: 500;
	word-break: break-word;
	overflow-wrap: break-word;
}

.readings-view .block-content a:hover {
	text-decoration: underline;
}

#about-section {
	font-family: 'Space Grotesk', sans-serif;
	font-size: 1rem;
	line-height: 1.6;
	max-width: 800px;
	margin: 2rem auto;
	padding: 1rem 1.5rem;
	color: #333;
	background: #f9f9f9;
	border-radius: 12px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#about-section h2,
#about-section h3 {
	font-family: 'Oxanium', sans-serif;
	font-weight: 700;
	margin-top: 1.5rem;
}

#about-section p,
#about-section li {
	font-family: 'Space Grotesk', sans-serif;
}

#about-section ul {
	padding-left: 1.2rem;
	margin-top: 0.5rem;
}

#about-section ul li {
	margin-bottom: 0.5rem;
}

#about-section a {
	color: #007b8a;
	text-decoration: none;
	font-weight: 500;
}

#about-section a:hover {
	text-decoration: underline;
	color: #005e66;
}

.block-meta .tags {
	margin-top: 0.25rem; /* reduced from something like 0.5rem or 1rem */
}

.small-tag {
	font-size: 0.7rem;
	font-weight: 500;
	color: #555;
	background: #e2e2e2;
	border-radius: 4px;
	padding: 0.15rem 0.4rem;
	margin-left: 0.25rem;
	text-transform: uppercase;
	display: inline-block;
	cursor: pointer;
	border: none;
	transition: background 0.2s ease;
}

.small-tag:hover {
	background: #ccc;
	color: #000;
	cursor: default;
}
