:root {
	--bg: #080b12;
	--panel: rgba(9, 14, 24, 0.74);
	--panel-strong: rgba(15, 22, 35, 0.88);
	--line: rgba(255, 255, 255, 0.15);
	--line-bright: rgba(255, 212, 116, 0.45);
	--text: rgba(255, 255, 255, 0.92);
	--muted: rgba(255, 255, 255, 0.62);
	--faint: rgba(255, 255, 255, 0.42);
	--gold: #f6c35d;
	--gold-soft: rgba(246, 195, 93, 0.16);
	--cyan: #61d9ff;
	--cyan-soft: rgba(97, 217, 255, 0.12);
	--danger: #ff8e8e;
	--good: #71e4a3;
	--shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
	box-sizing: border-box;
}

html {
	min-height: 100%;
	background: var(--bg);
}

body {
	margin: 0;
	min-height: 100%;
	color: var(--text);
	background:
		linear-gradient(135deg, rgba(8, 11, 18, 0.86), rgba(8, 11, 18, 0.72) 42%, rgba(7, 19, 27, 0.9)),
		url("../images/bg.jpg") center / cover fixed;
	line-height: 1.55;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	background:
		linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
	background-size: 46px 46px;
	mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 88%);
}

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

a:hover {
	color: var(--gold);
}

.throne-shell {
	width: min(1180px, calc(100% - 32px));
	margin: 0 auto;
	padding: 36px 0 48px;
}

.throne-hero {
	min-height: min(68vh, 680px);
	display: grid;
	align-content: center;
	padding: clamp(48px, 10vh, 120px) 0 38px;
	position: relative;
}

.site-link {
	position: absolute;
	top: 0;
	left: 0;
	display: inline-flex;
	align-items: center;
	min-height: 42px;
	padding: 0 16px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.04);
	color: var(--text);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.eyebrow {
	margin: 0 0 0.75rem;
	color: var(--gold);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

h1,
h2,
p {
	margin-top: 0;
}

h1 {
	max-width: 840px;
	margin-bottom: 1rem;
	font-size: clamp(3rem, 8vw, 7rem);
	line-height: 0.92;
	letter-spacing: 0;
	text-transform: none;
}

h2 {
	margin-bottom: 0;
	font-size: clamp(1.3rem, 2vw, 2rem);
	letter-spacing: 0;
	text-transform: none;
}

.hero-copy {
	max-width: 720px;
	margin-bottom: 2rem;
	color: rgba(255, 255, 255, 0.78);
	font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-signal {
	display: inline-flex;
	width: fit-content;
	max-width: 100%;
	align-items: center;
	gap: 0.8rem;
	padding: 0.75rem 1rem;
	border: 1px solid var(--line-bright);
	border-radius: 8px;
	background: linear-gradient(90deg, var(--gold-soft), rgba(255, 255, 255, 0.035));
	box-shadow: 0 0 34px rgba(246, 195, 93, 0.12);
}

.hero-signal span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 4.2rem;
	min-height: 2rem;
	padding: 0 0.65rem;
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.28);
	color: var(--gold);
	font-weight: 900;
	letter-spacing: 0.08em;
}

.hero-signal strong {
	color: var(--text);
	overflow-wrap: anywhere;
}

.data-status {
	margin-bottom: 1rem;
	padding: 0.85rem 1rem;
	border: 1px solid rgba(97, 217, 255, 0.25);
	border-radius: 8px;
	background: rgba(97, 217, 255, 0.08);
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.9rem;
}

.data-status.is-error {
	border-color: rgba(255, 142, 142, 0.38);
	background: rgba(255, 142, 142, 0.1);
	color: #ffd7d7;
}

.dashboard-grid,
.rule-chronicle-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
	gap: 1rem;
	margin-bottom: 1rem;
}

.panel {
	position: relative;
	overflow: hidden;
	padding: clamp(1rem, 2.5vw, 1.5rem);
	border: 1px solid var(--line);
	border-radius: 8px;
	background: linear-gradient(145deg, var(--panel-strong), var(--panel));
	box-shadow: var(--shadow);
	backdrop-filter: blur(18px);
}

.panel::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.panel-heading {
	position: relative;
	z-index: 1;
	margin-bottom: 1.25rem;
}

.throne-panel {
	min-height: 420px;
	border-color: var(--line-bright);
}

.king-mark {
	position: absolute;
	right: clamp(1rem, 4vw, 2rem);
	top: clamp(1rem, 4vw, 2rem);
	width: 96px;
	height: 96px;
	opacity: 0.38;
}

.king-mark span {
	display: block;
	width: 100%;
	height: 100%;
	border: 2px solid var(--gold);
	clip-path: polygon(50% 0, 64% 35%, 100% 22%, 81% 62%, 92% 100%, 8% 100%, 19% 62%, 0 22%, 36% 35%);
	background: linear-gradient(135deg, rgba(246, 195, 93, 0.42), rgba(246, 195, 93, 0.06));
	box-shadow: 0 0 42px rgba(246, 195, 93, 0.34);
}

.metric-grid,
.value-stack {
	position: relative;
	z-index: 1;
	display: grid;
	gap: 0.75rem;
	margin: 0;
}

.metric-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-grid div,
.value-stack div {
	min-width: 0;
	padding: 0.85rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.045);
}

dt {
	margin-bottom: 0.2rem;
	color: var(--faint);
	font-size: 0.76rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

dd {
	margin: 0;
	color: var(--text);
	font-size: clamp(1.05rem, 2vw, 1.45rem);
	font-weight: 800;
	overflow-wrap: anywhere;
}

.timestamp {
	position: relative;
	z-index: 1;
	margin: 1rem 0 0;
	color: var(--muted);
	font-size: 0.9rem;
}

.value-stack div:nth-child(2) {
	border-color: rgba(97, 217, 255, 0.34);
	background: var(--cyan-soft);
}

.chart-panel {
	margin-bottom: 1rem;
}

.chart-heading {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.25rem;
}

.chart-toggle {
	display: inline-grid;
	grid-template-columns: repeat(2, 1fr);
	min-width: min(100%, 330px);
	padding: 0.25rem;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.2);
}

.chart-toggle button {
	min-height: 2.45rem;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--muted);
	font: inherit;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
}

.chart-toggle button:hover,
.chart-toggle button:focus-visible {
	color: var(--text);
	outline: 1px solid rgba(255, 255, 255, 0.22);
	outline-offset: -1px;
}

.chart-toggle button.is-active {
	background: linear-gradient(135deg, rgba(246, 195, 93, 0.24), rgba(97, 217, 255, 0.14));
	color: var(--text);
	box-shadow: 0 0 24px rgba(246, 195, 93, 0.12);
}

.chart-context {
	position: relative;
	z-index: 1;
	max-width: 850px;
	margin-bottom: 0.4rem;
	color: rgba(255, 255, 255, 0.68);
	font-size: 0.95rem;
}

.chart-freshness {
	position: relative;
	z-index: 1;
	margin: 0 0 1rem;
	color: rgba(255, 255, 255, 0.76);
	font-size: 0.9rem;
	font-weight: 700;
}

.chart-freshness[hidden] {
	display: none;
}

.panel-note {
	margin: 0 0 1rem;
	color: var(--faint);
	font-size: 0.9rem;
}

.chart-metrics {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.chart-metrics div {
	min-width: 0;
	padding: 0.85rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.045);
}

.chart-metrics span {
	display: block;
	margin-bottom: 0.2rem;
	color: var(--faint);
	font-size: 0.74rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.chart-metrics strong {
	display: block;
	color: var(--text);
	font-size: clamp(1.05rem, 2vw, 1.35rem);
	overflow-wrap: anywhere;
}

.chart-frame {
	position: relative;
	z-index: 1;
	min-height: 320px;
	border: 1px solid rgba(97, 217, 255, 0.18);
	border-radius: 8px;
	background:
		linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
		rgba(0, 0, 0, 0.18);
	background-size: 44px 44px;
	overflow: hidden;
}

.benchmark-chart {
	display: block;
	width: 100%;
	height: 320px;
}

.chart-axis,
.chart-gridline {
	stroke: rgba(255, 255, 255, 0.16);
	stroke-width: 1;
	vector-effect: non-scaling-stroke;
}

.chart-zero {
	stroke: rgba(246, 195, 93, 0.38);
	stroke-dasharray: 5 5;
	stroke-width: 1.2;
	vector-effect: non-scaling-stroke;
}

.chart-line {
	fill: none;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
}

.chart-line.strategy {
	stroke: var(--gold);
}

.chart-line.spy,
.chart-line.excess-spy {
	stroke: var(--cyan);
}

.chart-line.qqq,
.chart-line.excess-qqq {
	stroke: #b8f27a;
}

.chart-label {
	fill: rgba(255, 255, 255, 0.72);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0;
}

.chart-legend {
	fill: rgba(255, 255, 255, 0.78);
	font-size: 12px;
	font-weight: 800;
}

.chart-empty {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	margin: 0;
	padding: 1rem;
	color: var(--muted);
	text-align: center;
}

.chart-empty[hidden] {
	display: none;
}

.muted {
	color: var(--muted);
	font-size: 0.95rem;
}

.is-positive {
	color: var(--good);
}

.is-negative {
	color: var(--danger);
}

.challengers-panel,
.rule-chronicle-grid {
	margin-bottom: 1rem;
}

.table-wrap {
	overflow-x: auto;
}

table {
	width: 100%;
	border-collapse: collapse;
	min-width: 640px;
}

th,
td {
	padding: 0.85rem 0.75rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	text-align: left;
}

th {
	color: var(--faint);
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

td {
	color: rgba(255, 255, 255, 0.82);
}

td:first-child,
td:nth-child(3),
td:nth-child(4) {
	font-weight: 800;
}

td:nth-child(3) {
	color: var(--cyan);
	letter-spacing: 0.08em;
}

.law-list,
.chronicle-list {
	margin: 0;
	padding-left: 1.2rem;
	color: rgba(255, 255, 255, 0.76);
}

.law-list li,
.chronicle-list li {
	margin-bottom: 0.75rem;
}

.chronicle-list time {
	color: var(--gold);
	font-weight: 800;
}

.disclaimer {
	padding: 1.1rem 1.25rem;
	border: 1px solid rgba(246, 195, 93, 0.34);
	border-radius: 8px;
	background: rgba(246, 195, 93, 0.09);
	color: rgba(255, 255, 255, 0.8);
	box-shadow: var(--shadow);
}

.disclaimer p {
	margin: 0;
}

@media screen and (max-width: 860px) {
	.throne-shell {
		width: min(100% - 24px, 720px);
		padding-top: 24px;
	}

	.throne-hero {
		min-height: auto;
		padding: 72px 0 30px;
	}

	.dashboard-grid,
	.rule-chronicle-grid {
		grid-template-columns: 1fr;
	}

	.chart-heading {
		flex-direction: column;
	}

	.chart-toggle {
		width: 100%;
	}

	.chart-metrics {
		grid-template-columns: 1fr;
	}

	.metric-grid {
		grid-template-columns: 1fr;
	}

	.king-mark {
		width: 68px;
		height: 68px;
	}

	table {
		min-width: 0;
	}

	thead {
		display: none;
	}

	tr {
		display: grid;
		gap: 0.25rem;
		padding: 0.8rem 0;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	}

	td {
		display: flex;
		justify-content: space-between;
		gap: 1rem;
		padding: 0.2rem 0;
		border-bottom: 0;
	}

	td::before {
		content: attr(data-label);
		color: var(--faint);
		font-size: 0.72rem;
		font-weight: 800;
		letter-spacing: 0.08em;
		text-transform: uppercase;
	}
}

@media screen and (max-width: 520px) {
	.hero-signal {
		align-items: flex-start;
		flex-direction: column;
	}

	.site-link {
		width: 100%;
		justify-content: center;
	}
}
