/* --- Base & Body Styles --- */
:root {
	/* Color Palette */
	--color-background: #FAF9F6;
	--color-surface: #ffffff;
	--color-border: #e5e7eb;
	--color-surface-muted: #f0e9db;
	--color-text-primary: #000;
	--color-text-secondary: #4b5563;
	--color-text-subtle: #6b7280;
	--color-positive: #22c55e;
    --color-negative: #ef4444;
	--color-neutral: #6b7280; /* Color for no change */
	--color-gradient-start: #f0e9db;
	--color-gradient-end: #000;
	--color-indicator-border: #000;

	/* Shadows */
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1),
    0 -6px 12px -4px rgba(0, 0, 0, 0.1);
}

@font-face {
		  font-family: 'arial_mt_stdlight';
		  src: url('fonts/arialmtstd-light.eot');
		  src: url('fonts/arialmtstd-light.eot?#iefix') format('embedded-opentype'),
			url('fonts/arialmtstd-light.woff2') format('woff2'),
			url('fonts/arialmtstd-light.woff') format('woff'),
			url('fonts/arialmtstd-light.ttf') format('truetype'),
			url('fonts/arialmtstd-light.svg#arial_mt_stdlight') format('svg');
		  font-weight: normal;
		  font-style: normal;
		}

		@font-face {
			font-family: 'arial-mt-std';
			src: url('fonts/Arial-MT-Std.ttf') format('truetype');
		  }

body {
	font-family: 'arial-mt-std', Arial, Helvetica, sans-serif;
	background-color: rgba(255, 255, 255, 0.7);
	color: var(--color-text-secondary);
	margin: 0;
	display: flex;
	align-items: center;
	/* justify-content: center; */
	padding: 1rem; /* 16px */
}

/* --- Main Card Component --- */
.card {
	width: 100%;
	max-width: 1100px; /* 672px */
	background-color: var(--color-surface);
	border-radius: 6px; /* 16px */
	box-shadow: var(--shadow-lg);
	padding: 1.5rem; /* 24px */
}

/* --- Card Header --- */
.card-header {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding-bottom: 1.5rem; /* 24px */
	border-bottom: 1px solid var(--color-border);
}
.card-header__info h1 {
	font-size: 1.5rem; /* 24px */
	font-weight: 700;
	color: var(--color-text-primary);
	margin: 0;
}
.card-header__info p {
	font-size: 1.125rem; /* 18px */
	font-weight: 500;
	color: #000;
	margin: 0;
}
.card-header__price {
	text-align: left;
	margin-top: 1rem; /* 16px */
}
.card-header__price .current-price {
	font-size: 2.25rem; /* 36px */
	font-weight: 700;
	letter-spacing: -0.025em;
	color: var(--color-text-primary);
	margin: 0;
}
.card-header__price .price-change-container {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	margin-top: 0.25rem; /* 4px */
	font-size: 1.125rem; /* 18px */
	font-weight: 600;
}
.price-change-container svg {
	height: 1.5rem; /* 24px */
	width: 1.5rem; /* 24px */
}
.price-change-container p {
	margin: 0 0 0 0.25rem; /* 4px */
}
.price-change-container.is-positive { color: var(--color-positive); }
.price-change-container.is-negative { color: var(--color-negative); }
.price-change-container.is-neutral { color: var(--color-neutral); }

/* --- Day's Range Visualizer --- */
.range-visualizer {
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
}
.range-visualizer__labels {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 16px; /* 14px */
	font-weight: 500;
	color: #000;
	margin-bottom: 0.5rem; /* 8px */
}
.range-visualizer__bar {
	position: relative;
	height: 0.5rem; /* 8px */
	background-color: var(--color-border);
	border-radius: 9999px;
}
.range-visualizer__fill {
	position: absolute;
	top: 0;
	height: 100%;
	background-image: linear-gradient(to right, var(--color-gradient-start), var(--color-gradient-end));
	border-radius: 9999px;
}
.range-visualizer__indicator {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
}
.range-visualizer__indicator div {
	width: 1.25rem; /* 20px */
	height: 1.25rem; /* 20px */
	background-color: var(--color-surface);
	border-radius: 50%;
	box-shadow: var(--shadow-lg);
	border: 2px solid var(--color-indicator-border);
}
.range-visualizer__values {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 16px; /* 14px */
	font-weight: 600;
	color: var(--color-text-primary);
	margin-top: 0.5rem; /* 8px */
}

/* --- Key Metrics Grid --- */
.metrics-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem; /* 24px */
	padding-top: 1.5rem; /* 24px */
	border-top: 1px solid var(--color-border);
}

@media (max-width: 550px) {
    .metrics-grid {
        grid-template-columns: 1fr; /* Stack items vertically on small screens */
    }
}

.metric-item {
	background-color: var(--color-surface-muted);
	border-radius: 6px; /* 8px */
	padding: 1rem; /* 16px */
}
.metric-item__label {
	font-size: 16px; /* 14px */
	font-weight: 500;
	color: #000;
	margin: 0;
}
.metric-item__label .date-label {
	font-weight: 400;
	margin-left: 0.5em;
}
.metric-item__value {
	font-size: 16px; /* 18px */
	font-weight: bold;
	color: var(--color-text-primary);
	margin: 0.25rem 0 0 0;
}

/* --- Card Footer --- */
.card-footer {
    text-align: center;
    margin-top: 24px; /* 32px */
    font-size: 12px; /* 12px */
    color: #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.card-footer p {
	margin: 0;
    text-align: left;
}

.poweredby img {
    height: 10px;
}

@media (max-width: 634px) {
    .card-footer > div.poweredby {
        margin-left: auto;
        margin-top: 20px;
    }
}

/* --- Loading Skeleton Styles --- */
.loading-placeholder {
	background-color: var(--color-border);
	border-radius: 0.25rem; /* 4px */
	color: transparent !important; /* Hide any text inside */
	user-select: none;
	animation: pulse 1.5s infinite ease-in-out;
	min-height: 1.2em; /* Ensure it has height */
	display: inline-block;
	width: 60%; /* Default placeholder width */
}
.loading-placeholder.w-full { width: 100%; }
.loading-placeholder.w-short { width: 30%; }
.loading-placeholder.w-price { width: 40%; }
.loading-placeholder.w-metric { width: 50%; }

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.6; }
}

/* --- Responsive Styles --- */
@media (min-width: 768px) {
	.card {
		padding: 2rem; /* 32px */
	}
	.card-header {
		flex-direction: row;
		align-items: center;
	}
	.card-header__price {
		text-align: right;
		margin-top: 0;
	}
	.card-header__price .price-change-container {
		justify-content: flex-end;
	}
	.card-header__price .current-price {
		font-size: 3rem; /* 48px */
	}
	.metrics-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}