/* Cartesia brand: fonts, color tokens, and base components.
 * Light theme by default; add class="dark" to <html> for the dark theme. */

@font-face { font-family: "ABC Diatype"; src: url("fonts/ABCDiatypeVariable.woff2") format("woff2"); font-weight: 200 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "ABC Diatype"; src: url("fonts/ABCDiatype-RegularItalic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "ABC Diatype"; src: url("fonts/ABCDiatype-MediumItalic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "PP Kyoto"; src: url("fonts/PPKyoto-VariableUprightVF.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "PP Kyoto"; src: url("fonts/PPKyoto-VariableItalicVF.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
	/* Brand palette */
	--carbon: #1e1c1a;
	--canvas: #f9f9f8;
	--snow: #fefefe;
	--growth: #abd49e;
	--verdant: #309d4b;
	--forest: #004e23;
	--harvest: #ffbb8a;
	--ember: #fc7a37;
	--mist: #d1e2e8;
	--memory: #99b0c8;
	--neutral-200: #f3f2ef;
	--neutral-400: #e4e3db;
	--neutral-500: #c5c2bc;
	--neutral-700: #787672;
	--neutral-800: #525150;

	/* Type */
	--font-sans: "ABC Diatype", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-display: "PP Kyoto", ui-serif, Georgia, serif;
	--font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
	/* ABC Diatype's variable axis maps these to regular / medium / semibold. */
	--weight-normal: 365;
	--weight-medium: 465;
	--weight-semibold: 565;

	/* Shape and motion */
	--radius: 8px;
	--radius-lg: 12px;
	--radius-xl: 16px;
	--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
	--duration: 150ms;

	/* Semantic tokens (light) */
	--background: #f9f9f8;
	--foreground: #39342f;
	--surface: #f5f5f2;
	--card: #fdfdfc;
	--muted: #f1f0ec;
	--muted-foreground: #636260;
	--accent: #f3f2ef;
	--field: #ffffff;
	--border: #dfdcd7;
	--boundary: #ededed;
	--ring: #a1a1a1;
	--primary: var(--forest);
	--primary-foreground: #fefefe;
	--highlight: var(--verdant);
	--success: #008236;
	--warning: #bb4d00;
	--destructive: #e7000b;
}

.dark {
	--background: #171715;
	--foreground: #cdc8c1;
	--surface: #262421;
	--card: #1d1c1a;
	--muted: #1e1c1a;
	--muted-foreground: #a1a1a1;
	--accent: #1e1c1a;
	--field: rgb(255 255 255 / 4.5%);
	--border: rgb(255 255 255 / 10%);
	--boundary: rgb(255 255 255 / 6%);
	--ring: #737373;
	--primary: var(--growth);
	--primary-foreground: #0a0a0a;
	--highlight: var(--growth);
	--success: #5ee9a0;
	--warning: #fe9a00;
	--destructive: #ff6467;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--background);
	color: var(--foreground);
	font-family: var(--font-sans);
	font-weight: var(--weight-normal);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: var(--weight-medium); letter-spacing: -0.01em; line-height: 1.2; }

/* Headlines in PP Kyoto, the brand display face. */
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; }
.display em { font-style: italic; }

/* Small uppercase label above a heading or field group. */
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-foreground); }

.muted { color: var(--muted-foreground); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.wordmark { display: block; height: 20px; width: auto; }

.card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
}

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 40px; padding: 0 16px;
	border: 1px solid transparent; border-radius: var(--radius);
	font: inherit; font-weight: var(--weight-medium); font-size: 15px;
	cursor: pointer; text-decoration: none; white-space: nowrap;
	transition: background-color var(--duration) var(--ease-out), border-color var(--duration) var(--ease-out), opacity var(--duration) var(--ease-out);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible, .input:focus-visible, .choice:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover:not(:disabled) { opacity: 0.9; }
.btn-secondary { background: var(--card); color: var(--foreground); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--accent); }
.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover:not(:disabled) { background: var(--accent); }
.btn-destructive { background: transparent; color: var(--destructive); border-color: color-mix(in oklab, var(--destructive) 35%, transparent); }
.btn-destructive:hover:not(:disabled) { background: color-mix(in oklab, var(--destructive) 8%, transparent); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 56px; padding: 0 28px; font-size: 18px; border-radius: var(--radius-lg); }

.label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: var(--weight-medium); }
.input {
	width: 100%; height: 44px; padding: 0 14px;
	background: var(--field); color: var(--foreground);
	border: 1px solid var(--border); border-radius: var(--radius);
	font: inherit; font-size: 16px;
}
.input::placeholder { color: color-mix(in oklab, var(--muted-foreground) 55%, transparent); }
.input-lg { height: 56px; font-size: 20px; border-radius: var(--radius-lg); }

/* Large tappable option card (radio-style); set aria-pressed or .selected. */
.choice {
	display: flex; flex-direction: column; gap: 4px; padding: 16px;
	background: var(--card); color: var(--foreground);
	border: 1px solid var(--border); border-radius: var(--radius-lg);
	font: inherit; text-align: left; cursor: pointer;
	transition: border-color var(--duration) var(--ease-out), background-color var(--duration) var(--ease-out);
}
.choice:hover { background: var(--accent); }
.choice.selected, .choice[aria-pressed="true"] { border-color: var(--highlight); box-shadow: inset 0 0 0 1px var(--highlight); background: color-mix(in oklab, var(--highlight) 8%, var(--card)); }

/* Status pill. */
.badge {
	display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px;
	border-radius: 999px; font-size: 12px; font-weight: var(--weight-medium);
	background: var(--muted); color: var(--muted-foreground);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { color: var(--success); background: color-mix(in oklab, var(--success) 12%, transparent); }
.badge-warning { color: var(--warning); background: color-mix(in oklab, var(--warning) 12%, transparent); }
.badge-destructive { color: var(--destructive); background: color-mix(in oklab, var(--destructive) 12%, transparent); }
.badge-info { color: var(--neutral-800); background: color-mix(in oklab, var(--memory) 30%, transparent); }
.dark .badge-info { color: var(--mist); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: var(--weight-medium); color: var(--muted-foreground); padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px; border-bottom: 1px solid var(--boundary); vertical-align: middle; }
