:root {
	color-scheme: light;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #172132;
	background: #f3f6f8;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;
	background: radial-gradient(circle at 15% 0%, #dcebe8 0, transparent 30rem), #f3f6f8;
}

a {
	color: #087f6d;
}

.site-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: min(76rem, calc(100% - 2rem));
	margin: 0 auto;
	padding: 1.25rem 0;
}

.brand {
	color: #172132;
	font-size: 1.15rem;
	font-weight: 850;
	letter-spacing: -.03em;
	text-decoration: none;
}

.brand span {
	color: #087f6d;
}

.nav-actions {
	display: flex;
	align-items: center;
	gap: 1rem;
	font-size: .9rem;
}

.nav-actions a, .button-link {
	color: #425263;
	font: inherit;
	text-decoration: none;
}

.button-link {
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 0;
}

.landing-shell {
	display: grid;
	grid-template-columns: minmax(0, 1.45fr) minmax(19rem, .65fr);
	align-items: center;
	gap: clamp(2rem, 8vw, 7rem);
	width: min(76rem, calc(100% - 2rem));
	min-height: calc(100vh - 6rem);
	margin: 0 auto;
	padding: 3rem 0 6rem;
}

.hero .intro {
	max-width: 46rem;
	font-size: clamp(1.05rem, 2vw, 1.3rem);
	line-height: 1.7;
}

.feature-row {
	display: flex;
	flex-wrap: wrap;
	gap: .65rem;
	margin-top: 2rem;
}

.feature-row span, .data-note {
	background: #e4f1ee;
	border: 1px solid #cfe4df;
	border-radius: 999px;
	color: #176b60;
	font-size: .78rem;
	font-weight: 700;
	padding: .42rem .7rem;
}

.login-card, .settings-card, .security-note {
	background: rgba(255, 255, 255, .94);
	border: 1px solid #dfe7ea;
	border-radius: 1rem;
	box-shadow: 0 1.5rem 4rem rgba(31, 52, 63, .1);
	padding: clamp(1.4rem, 4vw, 2rem);
}

.login-card label:not(:first-of-type), .form-section label:not(:first-of-type) {
	margin-top: 1.15rem;
}

button[type="submit"] {
	width: 100%;
	margin-top: 1.4rem;
	background: #087f6d;
	border: 0;
	border-radius: .7rem;
	color: white;
	cursor: pointer;
	font: inherit;
	font-weight: 750;
	padding: .95rem 1rem;
}

button[type="submit"]:hover {
	background: #076c5e;
}

button:disabled {
	cursor: wait;
	opacity: .6;
}

.page-shell {
	width: min(72rem, calc(100% - 2rem));
	margin: 0 auto;
	padding: 4.5rem 0;
}

.page-header {
	max-width: 45rem;
	margin-bottom: 2rem;
}

.compact-header h1 {
	font-size: clamp(2.2rem, 5vw, 3.5rem);
}

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

h1 {
	font-size: clamp(2.2rem, 6vw, 4.4rem);
	line-height: 1.02;
	letter-spacing: -0.045em;
	margin-bottom: 1rem;
}

.eyebrow {
	color: #087f6d;
	font-size: .76rem;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.intro {
	color: #617082;
	font-size: 1.12rem;
}

.search-card, .metrics-panel {
	background: rgba(255, 255, 255, .92);
	border: 1px solid #dfe7ea;
	border-radius: 1rem;
	box-shadow: 0 1.5rem 4rem rgba(31, 52, 63, .08);
	padding: clamp(1.25rem, 4vw, 2rem);
}

.section-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.section-heading h2, .section-heading .eyebrow {
	margin-bottom: .3rem;
}

.search-card {
	position: relative;
	z-index: 2;
}

.combobox {
	position: relative;
	max-width: 48rem;
}

label {
	display: block;
	font-size: .84rem;
	font-weight: 700;
	margin-bottom: .55rem;
}

input, select {
	width: 100%;
	border: 1px solid #c7d3d7;
	border-radius: .7rem;
	font: inherit;
	font-size: 1.05rem;
	padding: .95rem 1rem;
	background: white;
	transition: border-color .15s, box-shadow .15s;
}

input[type="checkbox"] {
	width: 1rem;
	height: 1rem;
	margin: 0;
	padding: 0;
}

input:focus, select:focus {
	border-color: #087f6d;
	box-shadow: 0 0 0 .2rem rgba(8, 127, 109, .13);
	outline: none;
}

.product-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .7rem;
	border-top: 1px solid #e3e9eb;
	margin-top: 1.5rem;
	padding-top: 1.25rem;
}

.product-actions select {
	width: auto;
	min-width: 12rem;
	font-size: .9rem;
	padding: .7rem .8rem;
}

.secondary-button, .primary-link, .danger-button, .icon-button, .table-action {
	border-radius: .6rem;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
}

.secondary-button, .primary-link {
	background: #e4f1ee;
	border: 1px solid #c5dfda;
	color: #087f6d;
	padding: .7rem .9rem;
	text-decoration: none;
}

.primary-link {
	background: #087f6d;
	border-color: #087f6d;
	color: white;
}

.primary-link[aria-disabled="true"] {
	pointer-events: none;
	opacity: .5;
}

.workspace-shell {
	display: grid;
	grid-template-columns: 15rem minmax(0, 1fr);
	gap: 1.5rem;
	width: min(82rem, calc(100% - 2rem));
	margin: 0 auto;
	padding: 2.5rem 0 6rem;
}

.workspace-header {
	display: flex;
	justify-content: space-between;
	align-items: end;
	gap: 2rem;
	grid-column: 1 / -1;
}

.workspace-header h1 {
	font-size: clamp(2.2rem, 5vw, 3.5rem);
	margin-bottom: 0;
}

.workspace-header > p {
	max-width: 32rem;
	color: #617082;
}

.workspace-sidebar, .workspace-content {
	background: rgba(255, 255, 255, .94);
	border: 1px solid #dfe7ea;
	border-radius: 1rem;
	box-shadow: 0 1.5rem 4rem rgba(31, 52, 63, .07);
	padding: 1.25rem;
}

.workspace-sidebar {
	align-self: start;
}

.inline-controls {
	display: flex;
	gap: .4rem;
}

.compact-form input {
	min-width: 0;
	font-size: .9rem;
	padding: .75rem;
}

.compact-form .icon-button {
	width: 2.8rem;
	flex: 0 0 2.8rem;
	margin: 0;
	background: #087f6d;
	border: 0;
	color: white;
	font-size: 1.3rem;
}

.list-navigation {
	display: grid;
	gap: .35rem;
	margin-top: 1.25rem;
}

.list-navigation-item {
	display: flex;
	justify-content: space-between;
	gap: .5rem;
	width: 100%;
	background: transparent;
	border: 0;
	border-radius: .55rem;
	color: #425263;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	padding: .7rem;
	text-align: left;
}

.list-navigation-item:hover, .list-navigation-item.active {
	background: #eaf5f2;
	color: #087f6d;
}

.list-navigation-item small {
	background: #dfe8e7;
	border-radius: 999px;
	padding: .1rem .45rem;
}

.danger-button {
	background: #fff3f3;
	border: 1px solid #edc7ca;
	color: #a52c37;
	padding: .6rem .8rem;
}

.table-scroll {
	overflow-x: auto;
	margin-top: 1rem;
}

.data-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .86rem;
}

.data-table th, .data-table td {
	border-bottom: 1px solid #e3e9eb;
	padding: .8rem .65rem;
	text-align: right;
	vertical-align: top;
	white-space: nowrap;
}

.data-table th:first-child, .data-table td:first-child {
	text-align: left;
}

.data-table th {
	color: #6b7887;
	font-size: .72rem;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.data-table td small {
	display: block;
	color: #788592;
	margin-top: .2rem;
}

.empty-cell {
	color: #6b7887;
	padding: 2.5rem !important;
	text-align: center !important;
}

.table-action {
	background: transparent;
	border: 0;
	color: #9b4350;
	font-size: 1.25rem;
	padding: .1rem .4rem;
}

.positive { color: #087f6d; font-weight: 700; }
.negative { color: #b23543; font-weight: 700; }

.summary-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: .75rem;
	margin-top: 1rem;
}

.summary-card {
	display: grid;
	gap: .25rem;
	background: #f7f9fa;
	border: 1px solid #e3e9eb;
	border-radius: .7rem;
	padding: 1rem;
}

.summary-card strong { font-size: 1.35rem; }
.summary-card span, .summary-card small { font-size: .78rem; color: #687686; }
.summary-card span.positive { color: #087f6d; }
.summary-card span.negative { color: #b23543; }

.chart-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin: 1.25rem 0;
}

.chart-card {
	position: relative;
	min-width: 0;
	border: 1px solid #e3e9eb;
	border-radius: .75rem;
	padding: 1rem;
}

.chart-card h3 { font-size: .92rem; }
.chart-card canvas { display: block; width: 100%; height: 280px; }
.chart-empty { position: absolute; inset: 48% 1.5rem auto; color: #6b7887; font-size: .82rem; text-align: center; }

.position-editor {
	background: #f7f9fa;
	border: 1px solid #e3e9eb;
	border-radius: .75rem;
	margin: 1.25rem 0;
	padding: 1rem;
}

.position-editor h3 { font-size: 1rem; }

.position-form {
	display: grid;
	grid-template-columns: repeat(6, minmax(6rem, 1fr));
	align-items: end;
	gap: .65rem;
}

.position-form label { margin: 0; }
.position-form input { font-size: .82rem; padding: .7rem; margin-top: .35rem; }
.position-form button[type="submit"] { height: 2.7rem; margin: 0; padding: .6rem; }

@media (max-width: 900px) {
	.workspace-shell { grid-template-columns: 1fr; }
	.workspace-header { grid-column: 1; }
	.workspace-header, .chart-grid { grid-template-columns: 1fr; display: grid; }
	.position-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
	.site-nav, .nav-actions { align-items: flex-start; }
	.nav-actions { flex-wrap: wrap; justify-content: flex-end; }
	.position-form { grid-template-columns: 1fr; }
	.product-heading { align-items: flex-start; }
}

.options {
	position: absolute;
	top: calc(100% + .4rem);
	left: 0;
	right: 0;
	max-height: 22rem;
	overflow-y: auto;
	list-style: none;
	margin: 0;
	padding: .4rem;
	background: white;
	border: 1px solid #d8e1e4;
	border-radius: .75rem;
	box-shadow: 0 1rem 2.5rem rgba(31, 52, 63, .16);
}

.option {
	display: grid;
	grid-template-columns: 5rem 1fr auto;
	gap: .75rem;
	align-items: center;
	border-radius: .5rem;
	cursor: pointer;
	padding: .8rem;
}

.option:hover, .option.active {
	background: #eaf5f2;
}

.option small, .status, article small {
	color: #6b7887;
}

.status {
	min-height: 1.3rem;
	margin: .8rem 0 0;
	font-size: .86rem;
}

.error-status {
	color: #a52c37;
}

.metrics-panel {
	margin-top: 1.5rem;
}

.product-heading {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: center;
	margin-bottom: 1.5rem;
}

.product-heading h2 {
	margin-bottom: 0;
}

.quote-meta {
	color: #6b7887;
	font-size: .82rem;
	margin: .5rem 0 0;
}

.symbol {
	background: #102f38;
	border-radius: .6rem;
	color: white;
	font-weight: 800;
	letter-spacing: .05em;
	padding: .65rem .85rem;
}

.metrics-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
}

.metrics-grid article {
	background: #f7f9fa;
	border: 1px solid #e5ebed;
	border-radius: .75rem;
	padding: 1.15rem;
}

.metrics-grid h3 {
	color: #536273;
	font-size: .82rem;
	font-weight: 700;
}

.metrics-grid p {
	font-size: 1.65rem;
	font-weight: 750;
	margin-bottom: .25rem;
}

.market-disclaimer {
	color: #6b7887;
	font-size: .78rem;
	line-height: 1.5;
	margin: 1.25rem 0 0;
}

.settings-shell {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(17rem, 1fr);
	gap: 1.5rem;
	width: min(68rem, calc(100% - 2rem));
	margin: 0 auto;
	padding: 3rem 0 6rem;
}

.settings-shell > .page-header {
	grid-column: 1 / -1;
	margin-bottom: 0;
}

.form-section + .form-section {
	border-top: 1px solid #e3e9eb;
	margin-top: 1.8rem;
	padding-top: 1.8rem;
}

.form-section h2, .security-note h2 {
	font-size: 1.2rem;
}

.form-section small {
	display: block;
	color: #6b7887;
	line-height: 1.5;
	margin-top: .45rem;
}

.optional {
	color: #748190;
	font-weight: 500;
}

.checkbox-label {
	display: flex;
	align-items: center;
	gap: .6rem;
	cursor: pointer;
}

#api-token-fields, #marketaux-token-fields {
	margin-top: 1rem;
}

.product-news {
	border-top: 1px solid #e3e9eb;
	margin-top: 1.25rem;
	padding-top: 1.5rem;
}

.product-news .section-heading a {
	font-size: .82rem;
}

.news-card-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: .8rem;
}

.news-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	background: #f7f9fa;
	border: 1px solid #e3e9eb;
	border-radius: .75rem;
	padding: 1rem;
}

.news-card h3 {
	font-size: .98rem;
	line-height: 1.35;
	margin: .45rem 0;
}

.news-card h3 a {
	color: #172132;
	text-decoration: none;
}

.news-card h3 a:hover, .news-table a:hover {
	color: #087f6d;
	text-decoration: underline;
}

.news-card p {
	color: #617082;
	font-size: .8rem;
	line-height: 1.5;
	margin-bottom: .8rem;
}

.sentiment {
	margin-top: auto;
	background: #e9efef;
	border-radius: 999px;
	font-size: .7rem;
	font-weight: 700;
	padding: .25rem .5rem;
}

.news-page {
	width: min(82rem, calc(100% - 2rem));
	padding-top: 2.5rem;
}

.news-page .workspace-header {
	margin-bottom: 1.5rem;
}

.news-filter {
	max-width: 35rem;
}

.news-filter input {
	font-size: .9rem;
	padding: .7rem .8rem;
}

.news-filter .secondary-button {
	white-space: nowrap;
}

.news-filter .button-link {
	padding: .7rem;
	white-space: nowrap;
}

.news-table th:nth-child(1), .news-table td:nth-child(1),
.news-table th:nth-child(2), .news-table td:nth-child(2),
.news-table th:nth-child(3), .news-table td:nth-child(3),
.news-table th:nth-child(4), .news-table td:nth-child(4) {
	text-align: left;
}

.news-table td:nth-child(3) {
	min-width: 24rem;
	max-width: 38rem;
	white-space: normal;
}

.news-table a {
	color: #172132;
	font-weight: 750;
	line-height: 1.4;
	text-decoration: none;
}

.news-table .news-summary {
	line-height: 1.5;
	margin-top: .4rem;
}

.security-note {
	align-self: start;
	box-shadow: none;
	color: #536273;
	font-size: .9rem;
	line-height: 1.65;
}

@media (max-width: 42rem) {
	.landing-shell, .settings-shell {
		display: block;
		padding-top: 2rem;
	}

	.login-card, .security-note {
		margin-top: 2rem;
	}

	.site-nav, .nav-actions {
		align-items: flex-start;
	}

	.nav-actions {
		flex-wrap: wrap;
		justify-content: flex-end;
	}

	#session-user {
		display: none;
	}

	.page-shell {
		padding: 2rem 0;
	}

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

	.news-card-grid {
		grid-template-columns: 1fr;
	}

	.option {
		grid-template-columns: 4rem 1fr;
	}

	.option small {
		grid-column: 2;
	}
}
