:root {
	--sci-ink: #111827;
	--sci-muted: #506176;
	--sci-line: #d4e1ec;
	--sci-panel: #ffffff;
	--sci-soft: #f4f8fb;
	--sci-green: #167765;
	--sci-blue: #234f8f;
	--sci-gold: #c98512;
	--sci-dark: #172033;
	--sci-shadow: 0 18px 50px rgba(25, 45, 72, 0.12);
}

body {
	background: linear-gradient(180deg, #f3f8fb 0, #ffffff 360px, #f6f8fb 100%);
}

.sci-shell {
	width: min(1180px, calc(100% - 32px));
	margin: 0 auto;
	padding: 28px 0 56px;
}

.sci-hero,
.sci-tool,
.content-grid > article,
.info-section,
.disclaimer {
	background: var(--sci-panel);
	border: 1px solid var(--sci-line);
	border-radius: 8px;
	box-shadow: var(--sci-shadow);
}

.sci-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
	gap: 28px;
	align-items: center;
	margin-bottom: 22px;
	padding: 34px;
	background: linear-gradient(135deg, #ffffff 0%, #eef8f6 58%, #f7f1e5 100%);
}

.sci-hero h1 {
	max-width: 780px;
	margin: 0;
	color: var(--sci-ink);
	font-size: clamp(38px, 5vw, 62px);
	line-height: 1.04;
}

.sci-hero p {
	max-width: 760px;
	margin: 14px 0 0;
	color: #405268;
	font-size: 18px;
}

.eyebrow {
	margin: 0 0 8px;
	color: #006b59;
	font-size: 13px;
	font-weight: 900;
	letter-spacing: 0;
	text-transform: uppercase;
}

.hero-note {
	display: grid;
	gap: 8px;
	padding: 22px;
	color: #ffffff;
	background: var(--sci-dark);
	border-radius: 8px;
}

.hero-note span {
	color: #9df0d1;
	font-size: 12px;
	font-weight: 900;
	text-transform: uppercase;
}

.hero-note strong {
	font-size: 28px;
	line-height: 1.1;
}

.hero-note p {
	margin: 0;
	color: #dce6f0;
	font-size: 15px;
}

.sci-tool {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(310px, 0.45fr);
	gap: 18px;
	align-items: start;
	margin-bottom: 22px;
	padding: 22px;
}

.calculator-card {
	display: grid;
	gap: 14px;
}

.sci-display {
	display: grid;
	gap: 8px;
	min-height: 132px;
	padding: 18px;
	color: #ffffff;
	background: var(--sci-dark);
	border-radius: 8px;
}

.display-expression {
	min-height: 28px;
	overflow-wrap: anywhere;
	color: #9df0d1;
	font-size: 17px;
	font-weight: 800;
}

.display-result {
	overflow-wrap: anywhere;
	color: #ffffff;
	font-size: clamp(34px, 5vw, 54px);
	font-weight: 900;
	line-height: 1.05;
	font-variant-numeric: tabular-nums;
}

.sci-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	padding: 12px;
	background: var(--sci-soft);
	border: 1px solid var(--sci-line);
	border-radius: 8px;
}

.angle-mode {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin: 0;
	padding: 0;
	border: 0;
}

.angle-mode legend {
	margin-right: 4px;
	color: var(--sci-muted);
	font-size: 13px;
	font-weight: 900;
	text-transform: uppercase;
}

.angle-mode label,
.memory-status {
	color: var(--sci-ink);
	font-weight: 800;
}

.sci-keys {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 8px;
}

.sci-keys button,
.result-card button,
.history-card button {
	min-height: 46px;
	cursor: pointer;
	color: var(--sci-ink);
	background: #ffffff;
	border: 1px solid #bfd2df;
	border-radius: 7px;
	font: inherit;
	font-weight: 900;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.sci-keys button:hover,
.result-card button:hover,
.history-card button:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 18px rgba(25, 45, 72, 0.12);
}

.sci-keys .number {
	background: #f7fafc;
}

.sci-keys .operator {
	color: #ffffff;
	background: var(--sci-blue);
	border-color: var(--sci-blue);
}

.sci-keys .danger {
	color: #ffffff;
	background: #a93636;
	border-color: #a93636;
}

.sci-keys .equals {
	color: #ffffff;
	background: var(--sci-green);
	border-color: var(--sci-green);
}

.sci-side {
	display: grid;
	gap: 14px;
}

.result-card,
.history-card {
	display: grid;
	gap: 12px;
	padding: 18px;
	background: #f8fbfd;
	border: 1px solid var(--sci-line);
	border-radius: 8px;
}

.result-card strong {
	color: var(--sci-green);
	font-size: 34px;
	line-height: 1.1;
	overflow-wrap: anywhere;
	font-variant-numeric: tabular-nums;
}

.result-card p:not(.eyebrow) {
	margin: 0;
	color: var(--sci-muted);
	overflow-wrap: anywhere;
}

.result-card button {
	color: #ffffff;
	background: var(--sci-green);
	border-color: var(--sci-green);
}

.result-card span {
	min-height: 20px;
	color: var(--sci-muted);
	font-size: 13px;
}

.history-card > div {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
}

.history-card button {
	min-height: 36px;
	padding: 6px 10px;
	color: var(--sci-green);
	background: #ffffff;
}

.history-card ol {
	display: grid;
	max-height: 280px;
	gap: 9px;
	margin: 0;
	padding-left: 20px;
	overflow: auto;
	color: var(--sci-muted);
}

.history-card li {
	overflow-wrap: anywhere;
}

.content-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin-bottom: 22px;
}

.content-grid > article,
.info-section,
.disclaimer {
	padding: 24px;
}

.content-grid h2,
.info-section h2,
.disclaimer h2 {
	margin: 0 0 10px;
	color: var(--sci-ink);
	font-size: 28px;
	line-height: 1.16;
}

.content-grid p,
.info-section p,
.disclaimer p {
	color: #46586d;
	line-height: 1.7;
}

.info-section {
	margin-bottom: 22px;
}

.section-heading {
	max-width: 840px;
	margin-bottom: 18px;
}

.example-grid,
.related-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

.example-grid article,
.related-grid a,
.checklist {
	padding: 18px;
	background: var(--sci-soft);
	border: 1px solid var(--sci-line);
	border-radius: 8px;
}

.example-grid span,
.related-grid span {
	color: var(--sci-green);
	font-size: 12px;
	font-weight: 900;
	text-transform: uppercase;
}

.example-grid h3,
.related-grid strong {
	display: block;
	margin: 8px 0 7px;
	color: var(--sci-ink);
	font-size: 18px;
	line-height: 1.25;
}

.related-grid a {
	color: inherit;
	text-decoration: none;
}

.related-grid a:hover {
	border-color: #91c9ba;
	box-shadow: 0 10px 24px rgba(25, 45, 72, 0.1);
}

.split-section {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
	gap: 20px;
	align-items: start;
}

.checklist strong {
	display: block;
	margin-bottom: 10px;
	color: var(--sci-ink);
	font-size: 18px;
}

.checklist ul {
	display: grid;
	gap: 8px;
	margin: 0;
	padding-left: 20px;
	color: #46586d;
}

.faq-list {
	display: grid;
	gap: 10px;
}

.faq-list details {
	padding: 15px 16px;
	background: var(--sci-soft);
	border: 1px solid var(--sci-line);
	border-radius: 8px;
}

.faq-list summary {
	cursor: pointer;
	color: var(--sci-ink);
	font-weight: 900;
}

.faq-list p {
	margin: 10px 0 0;
}

.disclaimer {
	background: #fff9eb;
	border-color: #ead39a;
}

@media (max-width: 980px) {
	.sci-hero,
	.sci-tool,
	.content-grid,
	.split-section {
		grid-template-columns: 1fr;
	}

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

@media (max-width: 700px) {
	.sci-shell {
		width: min(100% - 24px, 1180px);
		padding-top: 18px;
	}

	.sci-hero,
	.sci-tool,
	.content-grid > article,
	.info-section,
	.disclaimer {
		padding: 18px;
	}

	.sci-hero h1 {
		font-size: 34px;
	}

	.sci-side,
	.example-grid,
	.related-grid {
		grid-template-columns: 1fr;
	}

	.sci-keys {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.sci-keys button {
		min-height: 44px;
		font-size: 14px;
	}
}
