/*
 * Kvanta5 homepage dashboard
 *
 * Deliberately static and instrument-like:
 * no motion, ornamental animation, or block-conveyor effects.
 */

.bg-main > .container {
	max-width: 1180px;
}

.kv5-dashboard-heading {
	margin-bottom: 0.35rem;
}

.kv5-network-dashboard {
	font-variant-numeric: tabular-nums;
}

.kv5-network-dashboard > .card,
.kv5-status-card,
#kv5-latest-section .card,
#kv5-tools-section .card {
	overflow: hidden;
}

.kv5-telemetry-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kv5-dashboard-metric {
	min-width: 0;
	padding: 1rem 1.15rem 0.95rem;
	text-align: center;
}

.kv5-dashboard-metric + .kv5-dashboard-metric {
	border-left: 1px solid var(
		--bs-border-color,
		rgba(127, 127, 127, 0.24)
	);
}

.kv5-dashboard-label,
.kv5-status-label,
.kv5-tool-group-title {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.065em;
	line-height: 1.3;
	text-transform: uppercase;
}

.kv5-dashboard-label,
.kv5-status-label {
	color: var(--bs-primary);
	text-decoration: none;
}

a.kv5-dashboard-label:hover,
a.kv5-status-label:hover {
	color: var(--bs-link-hover-color);
}

.kv5-dashboard-value {
	margin-top: 0.35rem;
	line-height: 1.25;
	white-space: nowrap;
}

.kv5-dashboard-value-main {
	font-size: 1.23rem;
	font-weight: 400;
	letter-spacing: -0.015em;
}

.kv5-dashboard-divider {
	height: 1px;
	margin: 0 1.1rem;
	background: var(
		--bs-border-color,
		rgba(127, 127, 127, 0.24)
	);
}

.kv5-economics-grid {
	display: grid;
	grid-template-columns:
		minmax(0, 3fr)
		minmax(0, 6fr)
		minmax(0, 3fr);
	align-items: stretch;
}

.kv5-economics-cell {
	display: flex;
	min-width: 0;
	min-height: 9.1rem;
	padding: 1.1rem 1rem;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.kv5-economics-cell + .kv5-economics-cell {
	border-left: 1px solid var(
		--bs-border-color,
		rgba(127, 127, 127, 0.24)
	);
}

.kv5-economics-feature {
	background: rgba(42, 116, 214, 0.045);
}

.kv5-lifecycle-value {
	margin-top: 0.55rem;
	font-size: 1.28rem;
	line-height: 1.25;
	white-space: nowrap;
}

.kv5-feature-primary {
	margin-top: 0.45rem;
	font-size: 1.38rem;
	font-weight: 400;
	letter-spacing: -0.018em;
	line-height: 1.25;
	white-space: nowrap;
}

.kv5-feature-usd {
	margin-top: 0.3rem;
	font-size: 0.88rem;
	line-height: 1.3;
}

.kv5-feature-fees {
	margin-top: 0.45rem;
	font-size: 0.82rem;
	line-height: 1.3;
	color: var(--bs-secondary-color);
	white-space: nowrap;
}

.kv5-feature-source {
	margin-top: 0.35rem;
	font-size: 0.68rem;
	line-height: 1.25;
	color: var(--bs-secondary-color);
}

.kv5-status-card {
	margin-top: 0.75rem;
}

.kv5-status-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kv5-status-cell {
	min-width: 0;
	padding: 0.78rem 1rem 0.82rem;
	text-align: center;
}

.kv5-status-cell + .kv5-status-cell {
	border-left: 1px solid var(
		--bs-border-color,
		rgba(127, 127, 127, 0.24)
	);
}

.kv5-status-value {
	min-height: 1.35rem;
	margin-top: 0.32rem;
	font-size: 0.86rem;
	line-height: 1.35;
	white-space: nowrap;
}

#index-next-block .pb-4 {
	padding-bottom: 0 !important;
}

#index-next-block .mt-2 {
	margin-top: 0 !important;
}

#index-next-block .spinner-border {
	width: 0.85rem;
	height: 0.85rem;
	border-width: 0.12em;
}


/* Latest blocks */

#kv5-latest-section {
	margin-top: 0.95rem;
}

#kv5-latest-section > .d-flex {
	margin-bottom: 0.25rem;
}

#kv5-latest-section .card-body {
	padding: 0.7rem 0.85rem;
}

#live-latest-blocks table {
	font-variant-numeric: tabular-nums;
}

#live-latest-blocks tbody td {
	padding-top: 0.48rem;
	padding-bottom: 0.48rem;
	vertical-align: middle;
}


/* Compact tools matrix */

#kv5-tools-section {
	margin-top: 0.9rem;
}

#kv5-tools-section .card-body {
	padding: 0.75rem;
}

.kv5-tool-group {
	height: 100%;
	padding: 0.25rem;
}

.kv5-tool-group-title {
	width: 100%;
	padding: 0 0.35rem 0.55rem;
	border-bottom: 1px solid var(
		--bs-border-color,
		rgba(127, 127, 127, 0.24)
	);
	color: var(--bs-primary);
}

.kv5-tool-list {
	display: grid;
	gap: 0.25rem;
	margin-top: 0.3rem;
}

.kv5-tool-item {
	display: grid;
	grid-template-columns: 1.7rem minmax(0, 1fr) auto;
	gap: 0.55rem;
	align-items: center;
	padding: 0.55rem 0.6rem;
	border: 1px solid transparent;
	border-radius: var(--bs-border-radius);
	color: inherit;
	text-decoration: none;
}

.kv5-tool-item:hover {
	border-color: var(
		--bs-border-color,
		rgba(127, 127, 127, 0.24)
	);
	background: rgba(42, 116, 214, 0.045);
	color: inherit;
}

.kv5-tool-icon {
	font-size: 1rem;
	text-align: center;
	color: var(--bs-primary);
}

.kv5-tool-name {
	font-size: 0.83rem;
	line-height: 1.2;
	color: var(--bs-link-color);
}

.kv5-tool-description {
	margin-top: 0.12rem;
	font-size: 0.7rem;
	line-height: 1.3;
	color: var(--bs-secondary-color);
}

.kv5-tool-chevron {
	font-size: 0.68rem;
	color: var(--bs-secondary-color);
}


@media (max-width: 991.98px) {
	.kv5-telemetry-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.kv5-dashboard-metric:nth-child(3) {
		border-left: 0;
		border-top: 1px solid var(
			--bs-border-color,
			rgba(127, 127, 127, 0.24)
		);
	}

	.kv5-dashboard-metric:nth-child(4) {
		border-top: 1px solid var(
			--bs-border-color,
			rgba(127, 127, 127, 0.24)
		);
	}
}


@media (max-width: 767.98px) {
	.kv5-economics-grid,
	.kv5-status-grid {
		grid-template-columns: 1fr;
	}

	.kv5-economics-feature {
		order: -1;
	}

	.kv5-economics-cell {
		min-height: auto;
		padding: 1rem;
	}

	.kv5-economics-cell + .kv5-economics-cell,
	.kv5-status-cell + .kv5-status-cell {
		border-left: 0;
		border-top: 1px solid var(
			--bs-border-color,
			rgba(127, 127, 127, 0.24)
		);
	}

	.kv5-feature-primary {
		font-size: 1.18rem;
	}

	.kv5-feature-fees,
	.kv5-status-value {
		white-space: normal;
	}
}


@media (max-width: 479.98px) {
	.kv5-telemetry-grid {
		grid-template-columns: 1fr;
	}

	.kv5-dashboard-metric + .kv5-dashboard-metric {
		border-left: 0;
		border-top: 1px solid var(
			--bs-border-color,
			rgba(127, 127, 127, 0.24)
		);
	}
}

/* KV5 HOMEPAGE READABILITY — START */

.kv5-dashboard-label,
.kv5-status-label,
.kv5-tool-group-title {
	font-size: 0.82rem;
	letter-spacing: 0.055em;
}

.kv5-dashboard-value-main {
	font-size: 1.27rem;
}

.kv5-lifecycle-value {
	font-size: 1.32rem;
}

.kv5-feature-primary {
	font-size: 1.44rem;
}

.kv5-feature-usd {
	font-size: 0.92rem;
}

.kv5-feature-fees {
	font-size: 0.88rem;
}

.kv5-feature-source {
	font-size: 0.76rem;
}

.kv5-status-value {
	font-size: 0.92rem;
}

#live-latest-blocks table {
	font-size: 0.94rem;
}

#live-latest-blocks thead {
	font-size: 0.88rem;
}

.kv5-tool-name {
	font-size: 0.90rem;
}

.kv5-tool-description {
	font-size: 0.78rem;
	line-height: 1.4;
}

.kv5-tool-icon {
	font-size: 1.08rem;
}

.kv5-tool-chevron {
	font-size: 0.80rem;
}

/* KV5 HOMEPAGE READABILITY — END */

/* KV5 DARK TRANSLUCENT PANELS — START */

/*
 * Fixed dark translucent backgrounds.
 *
 * Do not derive these from Bootstrap theme variables: that caused
 * the previous light-gray panel failure.
 */
.kv5-network-dashboard > .card,
.kv5-status-card,
#kv5-latest-section .card,
#kv5-tools-section .card {
	background-color:
		var(--kv5-panel-background) !important;

	-webkit-backdrop-filter:
		blur(4px) saturate(110%);

	backdrop-filter:
		blur(4px) saturate(110%);
}


/*
 * Preserve the featured center metric without making it opaque.
 */
.kv5-economics-feature {
	background-color:
		rgba(30, 72, 126, 0.10) !important;
}


/*
 * Bootstrap tables apply color through both background-color and
 * inset box shadows. Clear both, then add restrained dark stripes.
 */
#live-latest-blocks .table {
	--bs-table-bg: transparent;
	--bs-table-color: inherit;
	--bs-table-striped-bg: transparent;
	--bs-table-striped-color: inherit;
	--bs-table-hover-bg: transparent;
	--bs-table-hover-color: inherit;
	--bs-table-accent-bg: transparent;
}

#live-latest-blocks .table
	> :not(caption)
	> *
	> * {
	background-color: transparent !important;
	box-shadow: none !important;
}

#live-latest-blocks .table-striped
	> tbody
	> tr:nth-of-type(odd)
	> * {
	background-color:
		rgba(5, 15, 27, 0.30) !important;
}

#live-latest-blocks .table-striped
	> tbody
	> tr:nth-of-type(even)
	> * {
	background-color:
		rgba(24, 42, 63, 0.20) !important;
}

#live-latest-blocks .table-hover
	> tbody
	> tr:hover
	> * {
	background-color:
		rgba(35, 91, 163, 0.16) !important;
}


/*
 * Keep Tools transparent until a row is intentionally highlighted.
 */
.kv5-tool-item {
	background-color: transparent;
}

.kv5-tool-item:hover {
	background-color:
		rgba(35, 91, 163, 0.12);
}

/* KV5 DARK TRANSLUCENT PANELS — END */

/* KV5 NETWORK TECHNICAL DETAILS BEGIN */

.kv5-network-technical-card {
    margin-top:
        0.75rem;

    overflow:
        hidden;
}

.kv5-network-technical-card > .card-body,
.kv5-network-technical-grid,
.kv5-network-technical-cell {
    background:
        transparent !important;

    background-color:
        transparent !important;

    background-image:
        none !important;
}

.kv5-network-technical-grid {
    display:
        grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap:
        0;
}

.kv5-network-technical-cell {
    min-width:
        0;

    padding:
        0.82rem 0.70rem;

    border-right:
        1px solid
        rgba(88, 132, 181, 0.18);

    border-bottom:
        1px solid
        rgba(88, 132, 181, 0.18);

    text-align:
        center;
}

.kv5-network-technical-cell:nth-child(5n) {
    border-right:
        0;
}

.kv5-network-technical-cell:nth-last-child(-n + 5) {
    border-bottom:
        0;
}

.kv5-network-technical-label {
    display:
        inline-block;

    max-width:
        100%;

    margin-bottom:
        0.28rem;

    color:
        var(--bs-primary);

    font-size:
        0.72rem;

    font-weight:
        400;

    line-height:
        1.15;

    letter-spacing:
        0.035em;

    text-transform:
        uppercase;
}

.kv5-network-technical-value {
    min-width:
        0;

    color:
        rgba(245, 249, 253, 0.96);

    font-size:
        clamp(
            0.88rem,
            0.82rem + 0.14vw,
            1rem
        );

    line-height:
        1.25;

    font-variant-numeric:
        tabular-nums;

    overflow-wrap:
        anywhere;
}

@media (max-width: 1199.98px) {
    .kv5-network-technical-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .kv5-network-technical-cell:nth-child(5n) {
        border-right:
            1px solid
            rgba(88, 132, 181, 0.18);
    }

    .kv5-network-technical-cell:nth-child(3n) {
        border-right:
            0;
    }

    .kv5-network-technical-cell:nth-last-child(-n + 5) {
        border-bottom:
            1px solid
            rgba(88, 132, 181, 0.18);
    }
}

@media (max-width: 767.98px) {
    .kv5-network-technical-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .kv5-network-technical-cell:nth-child(3n) {
        border-right:
            1px solid
            rgba(88, 132, 181, 0.18);
    }

    .kv5-network-technical-cell:nth-child(2n) {
        border-right:
            0;
    }
}

@media (max-width: 419.98px) {
    .kv5-network-technical-grid {
        grid-template-columns:
            minmax(0, 1fr);
    }

    .kv5-network-technical-cell,
    .kv5-network-technical-cell:nth-child(2n),
    .kv5-network-technical-cell:nth-child(3n),
    .kv5-network-technical-cell:nth-child(5n) {
        border-right:
            0;
    }

    .kv5-network-technical-cell:last-child {
        border-bottom:
            0;
    }
}

/* KV5 NETWORK TECHNICAL DETAILS END */
