/* NUCALORIC design system — monochrome, hairline, mono-labelled (after the assetsv2 references). */
@font-face {
	font-family: 'Manrope';
	src: url('../fonts/Manrope.ttf') format('truetype');
	font-weight: 200 800;
	font-display: swap;
}

:root {
	--bg: #060606;
	--bg-2: #0a0a0a;
	--card: #0d0d0d;
	--card-2: #121212;
	--line: rgba(255, 255, 255, 0.11);
	--line-2: rgba(255, 255, 255, 0.2);
	--text: #f4f4f2;
	--muted: #8d8d8a;
	--dim: #4c4c4a;
	--studio: #e8e8e6;
	--ink: #121212;
	--ink-muted: #6b6b68;
	--green: #4fdc8b;
	--pink: #efb9ca;
	--red: #ff6b6b;
	--amber: #f5c26b;
	--r: 22px;
	--r-sm: 12px;
	--font: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
	--mono: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
	--ease: cubic-bezier(0.16, 1, 0.3, 1);
	color-scheme: dark;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

[hidden] {
	display: none !important;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	overflow-x: clip;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img,
video,
svg {
	display: block;
	max-width: 100%;
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input,
textarea,
select {
	font: inherit;
	color: inherit;
}

::selection {
	background: rgba(239, 185, 202, 0.35);
}

:focus-visible {
	outline: 2px solid var(--text);
	outline-offset: 2px;
	border-radius: 6px;
}

.mono {
	font-family: var(--mono);
	letter-spacing: 0.04em;
}

.label {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}

.muted {
	color: var(--muted);
}

.dot {
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--green);
	vertical-align: middle;
}

.dot.off {
	background: var(--dim);
}

.dot.warn {
	background: var(--amber);
}

/* ------------------------------------------------------------ buttons, inputs, chips */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 44px;
	padding: 0 20px;
	border-radius: 999px;
	border: 1px solid var(--line-2);
	background: transparent;
	color: var(--text);
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease), opacity 0.2s;
}

.btn:hover {
	border-color: rgba(255, 255, 255, 0.4);
	background: rgba(255, 255, 255, 0.04);
}

.btn:active {
	transform: scale(0.98);
}

.btn.primary {
	background: var(--text);
	color: #0a0a0a;
	border-color: var(--text);
}

.btn.primary:hover {
	background: #fff;
}

.btn.sm {
	height: 34px;
	padding: 0 14px;
	font-size: 13px;
}

.btn.ghost {
	border-color: transparent;
}

.btn.danger {
	color: var(--red);
	border-color: rgba(255, 107, 107, 0.35);
}

.btn[disabled] {
	opacity: 0.45;
	pointer-events: none;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 7px 14px;
	border-radius: 999px;
	border: 1px solid var(--line);
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text);
	background: rgba(10, 10, 10, 0.6);
}

.tag {
	display: inline-flex;
	padding: 3px 9px;
	border: 1px solid var(--line);
	border-radius: 7px;
	font-family: var(--mono);
	font-size: 11px;
	color: var(--muted);
	letter-spacing: 0.04em;
}

.input,
.textarea,
.select {
	width: 100%;
	height: 46px;
	padding: 0 16px;
	border-radius: var(--r-sm);
	border: 1px solid var(--line);
	background: var(--bg-2);
	outline: none;
	transition: border-color 0.2s;
}

.textarea {
	height: auto;
	min-height: 110px;
	padding: 14px 16px;
	resize: vertical;
	line-height: 1.5;
}

.input:focus,
.textarea:focus,
.select:focus {
	border-color: rgba(255, 255, 255, 0.45);
}

.field {
	display: grid;
	gap: 8px;
}

.field > span {
	font-size: 13px;
	color: var(--muted);
}

/* ------------------------------------------------------------ layout helpers */
.row {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

/* ------------------------------------------------------------ surfaces */
.card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--r);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hair {
	border: 1px solid var(--line);
}

/* Soft overhead light for standalone pages (login, 404). */
.dots-bg {
	background: radial-gradient(ellipse 80% 60% at 65% -10%, rgba(255, 255, 255, 0.05), transparent 70%), var(--bg);
}

/* Matte black tile (the assetsv2 icon renders). */
.tile {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 15px;
	background: linear-gradient(160deg, #1d1d1d, #0b0b0b 65%);
	border: 1px solid var(--line);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 30px rgba(0, 0, 0, 0.5);
	color: var(--text);
	font-family: var(--mono);
	font-size: 15px;
}

.tile svg {
	width: 24px;
	height: 24px;
}

/* The N monogram as a mask so it takes currentColor. */
.n-mark {
	display: inline-block;
	width: 0.55em;
	height: 1em;
	background: currentColor;
	-webkit-mask: url('../img/n-mark.svg') center / contain no-repeat;
	mask: url('../img/n-mark.svg') center / contain no-repeat;
}

.wordmark {
	display: block;
	height: 20px;
	aspect-ratio: 6.044;
	background: currentColor;
	-webkit-mask: url('../img/nucaloric-wordmark.svg') left center / contain no-repeat;
	mask: url('../img/nucaloric-wordmark.svg') left center / contain no-repeat;
}

/* Vertical-bar meter (the "Extended 71%" reference). */
.bars {
	display: flex;
	gap: 3px;
	height: 26px;
	align-items: stretch;
}

.bars i {
	flex: 1;
	min-width: 3px;
	border-radius: 2px;
	background: #262626;
}

.bars i.on {
	background: var(--text);
}

/* Code */
pre,
code {
	font-family: var(--mono);
	font-size: 13px;
}

pre {
	margin: 0;
	padding: 18px 20px;
	overflow-x: auto;
	background: #080808;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	line-height: 1.65;
	color: #e6e6e3;
}

:not(pre) > code {
	padding: 2px 6px;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.07);
	font-size: 0.88em;
}

.tok-k {
	color: var(--pink);
}

.tok-s {
	color: var(--green);
}

.tok-c {
	color: var(--dim);
}

/* tables */
.table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.table th {
	text-align: left;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
	font-weight: 400;
	padding: 0 16px 14px;
	border-bottom: 1px solid var(--line);
}

.table td {
	padding: 18px 16px;
	border-bottom: 1px solid var(--line);
	vertical-align: top;
}

.table tr:last-child td {
	border-bottom: 0;
}

.table .num {
	font-family: var(--mono);
	text-align: right;
	white-space: nowrap;
}

.table th.num {
	text-align: right;
}

.table-wrap {
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: var(--r);
	padding: 22px 8px 6px;
	background: var(--bg-2);
}

pre {
	position: relative;
}

pre > .copy {
	position: absolute;
	top: 8px;
	right: 8px;
}

.toast {
	position: fixed;
	left: 50%;
	bottom: 28px;
	z-index: 100;
	transform: translateX(-50%) translateY(20px);
	opacity: 0;
	padding: 12px 18px;
	border-radius: 999px;
	background: var(--text);
	color: #0a0a0a;
	font-weight: 600;
	font-size: 14px;
	pointer-events: none;
	transition: opacity 0.25s, transform 0.35s var(--ease);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.toast.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.toast.error {
	background: var(--red);
	color: #160404;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}
