/**
 * Shared shell for stock tool pages (B2.14 Pass B).
 *
 * - .ms-sh*        stock-context header (logo · ticker · company · page title · price),
 *                  rendered by ms_render_stock_context_header(). Used by Outlook and
 *                  the Investment Case.
 * - .ms-app-shell  stock-page visual language (gradient page, #1a1f24 card, silver
 *   .ms-app-card   border, 20px radius) with a wide application workspace.
 *
 * Colours come from ms-tokens.css (derived copy of the canonical shared tokens) and
 * the theme's stock-page variables (--background-*, --tab-gray).
 */

/* ----- Stock-context header ----- */
.ms-sh {
	display: grid;
	grid-template-columns: auto 1fr auto auto;
	align-items: end;
	gap: 0.75rem 1.25rem;
	padding: 0.75rem 0.75rem 1rem;
	margin: 0;
	font-family: var(--ms-font, inherit);
}
.ms-sh__logo { flex: 0 0 auto; }
/* Logo shortcode fallback badge (ms-logo-shortcode-bridge.php). */
.ms-io-stock-logo-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	background: linear-gradient(145deg, #2a3239 0%, #1a1f24 100%);
	border: 1px solid rgba(192, 192, 192, 0.35);
	color: #e8e6e3;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1;
	box-sizing: border-box;
}
.ms-sh__titles { min-width: 0; }
.ms-sh .ms-sh__ticker {
	margin: 0 0 0.15em;
	font-family: var(--ms-font, inherit);
	font-size: clamp(1.75rem, 4vw, 2.35rem);
	line-height: 1.1;
	font-weight: 700;
	letter-spacing: normal;
	color: #ffffff;
}
.ms-sh .ms-sh__company {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.25;
	color: #cdcdcd;
}
.ms-sh__center {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-width: 0;
	padding-right: 1rem;
}
.ms-sh .ms-sh__title {
	margin: 0;
	font-size: clamp(1.15rem, 2.5vw, 1.65rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--ms-gold, #f59e0b);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.ms-sh__quote {
	text-align: right;
	margin-left: auto;
}
.ms-sh__price {
	font-size: 1.6rem;
	font-weight: 600;
	color: #ffffff;
	line-height: 1.1;
}
.ms-sh__price-sub {
	max-width: 14rem;
	margin-left: auto;
	font-size: 0.75rem;
	line-height: 1.35;
	color: #a8a29e;
}
.ms-sh__change {
	font-size: 0.95rem;
	margin-top: 0.2rem;
}
.ms-sh__delayed {
	padding-top: 6px;
	line-height: 1.35;
}
.ms-sh__back {
	margin: 0 0 8px;
	padding: 0 0.75rem;
	font-size: 0.85rem;
}
.ms-sh__back a {
	color: #cdcdcd;
	text-decoration: none;
}
.ms-sh__back a:hover {
	color: var(--ms-gold-strong, #fbbf24);
	text-decoration: underline;
}

@media (max-width: 782px) {
	.ms-sh {
		grid-template-columns: auto 1fr auto;
	}
	.ms-sh__center {
		grid-column: 1 / -1;
		grid-row: 2;
		justify-content: flex-start;
		padding-right: 0;
	}
}

/* ----- Application shell: same visual language as the stock page, wider workspace ----- */
.ms-app-page {
	background: var(--background-outer-main, #121417);
	background-size: 400% 400%;
	padding: 0 0 var(--ms-space-footer, 96px);
}
.ms-app-shell {
	width: min(1280px, 94%);
	margin: 0 auto;
	padding-top: var(--ms-space-4, 16px);
	box-sizing: border-box;
}
.ms-app-card {
	background: var(--background-wrapper-main, #1a1f24);
	border: 1px solid var(--tab-gray, #c0c0c0);
	border-radius: 20px;
	padding: clamp(16px, 2.5vw, 32px);
	box-sizing: border-box;
}

@media (max-width: 782px) {
	.ms-app-page { padding-bottom: 56px; }
	.ms-app-shell { width: 100%; padding: 8px 8px 0; }
	.ms-app-card { padding: 16px 12px; border-radius: 14px; }
}
