@font-face {
	font-family: 'Space Grotesk';
	src: url('/fonts/space-grotesk/space-grotesk-latin.woff2') format('woff2');
	font-style: normal;
	font-weight: 500 700;
	font-display: swap;
}

:root {
	color-scheme: light dark;
	--er-accent: light-dark(#f04b23, #ff6333);
	--er-canvas: light-dark(#f7f5ef, #11100e);
	--er-panel: light-dark(#fff, #1b1916);
	--er-line: light-dark(#d8d4ca, #3b3731);
	--er-text: light-dark(#171613, #f5f0e6);
	--er-muted: light-dark(#68645c, #aaa39a);
	--er-sans: 'Space Grotesk', system-ui, sans-serif;
	--er-mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;
}

.edge-rewrite-ui,
.edge-rewrite-ui * {
	box-sizing: border-box;
}

.edge-rewrite-ui {
	color: var(--er-text);
	font-family: var(--er-sans);
	line-height: 1.5;
}

body[class*='edge-rewrite-mode-'] {
	--er-panel: #fff;
	--er-line: #d8d4ca;
	--er-text: #171613;
	--er-muted: #68645c;
}

.edge-rewrite-shell,
.edge-rewrite-attribution {
	width: min(calc(100% - 48px), 1200px);
	margin-inline: auto;
}

.edge-rewrite-nav {
	display: flex;
	min-height: 72px;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	border-bottom: 1px solid var(--er-line);
}

.edge-rewrite-brand,
.edge-rewrite-actions,
.edge-rewrite-button {
	display: inline-flex;
	align-items: center;
}

.edge-rewrite-brand {
	gap: 10px;
	color: var(--er-text) !important;
	font-weight: 700;
	text-decoration: none !important;
}

.edge-rewrite-mark {
	display: block;
	width: 18px;
	height: 18px;
	background: var(--er-accent);
	clip-path: polygon(0 0, 100% 0, 100% 65%, 65% 100%, 0 100%);
}

.edge-rewrite-actions {
	gap: 9px;
}

.edge-rewrite-mode,
.edge-rewrite-eyebrow,
.edge-rewrite-ray,
.edge-rewrite-facts dt,
.edge-rewrite-pun-label,
.edge-rewrite-card-index {
	font-family: var(--er-mono);
	font-size: 12px;
}

.edge-rewrite-mode {
	padding: 5px 9px;
	border: 1px solid var(--er-line);
	text-transform: uppercase;
}

.edge-rewrite-button {
	justify-content: center;
	min-height: 40px;
	padding: 8px 16px;
	border: 1px solid var(--er-line);
	color: var(--er-text) !important;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
}

.edge-rewrite-button--primary,
.edge-rewrite-home .edge-rewrite-button {
	background: var(--er-accent);
	border-color: var(--er-accent);
	color: #fff !important;
}

.edge-rewrite-location,
.edge-rewrite-translation {
	background: var(--er-panel);
	border: 1px solid var(--er-line);
}

.edge-rewrite-location {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
	gap: 40px;
	margin: 48px 0 64px;
	padding: clamp(28px, 5vw, 52px);
}

.edge-rewrite-location h2,
.edge-rewrite-translation h2,
.edge-rewrite-attribution h2 {
	margin: 12px 0 18px;
	color: var(--er-text);
	font-family: var(--er-sans);
	font-weight: 700;
	line-height: 1.02;
}

.edge-rewrite-location h2 {
	max-width: 16ch;
	font-size: clamp(34px, 5vw, 54px);
}

.edge-rewrite-location p,
.edge-rewrite-translation p,
.edge-rewrite-attribution p {
	color: var(--er-muted);
}

.edge-rewrite-eyebrow,
.edge-rewrite-facts dt,
.edge-rewrite-pun-label {
	color: var(--er-muted);
	text-transform: uppercase;
}

.edge-rewrite-facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-self: center;
	margin: 0;
	border: 1px solid var(--er-line);
}

.edge-rewrite-facts div {
	padding: 15px;
	border-bottom: 1px solid var(--er-line);
}

.edge-rewrite-facts div:nth-child(odd) {
	border-right: 1px solid var(--er-line);
}
.edge-rewrite-facts div:nth-last-child(-n + 2) {
	border-bottom: 0;
}
.edge-rewrite-facts dd {
	margin: 5px 0 0;
	font-weight: 700;
}
.edge-rewrite-ray {
	grid-column: 1 / -1;
	margin: -22px 0 0 !important;
}
.edge-rewrite-ray code {
	color: var(--er-accent);
}

.edge-rewrite-translation {
	width: min(calc(100% - 48px), 960px);
	margin: 48px auto;
	padding: clamp(28px, 5vw, 48px);
	border-left: 6px solid var(--er-accent);
}

.edge-rewrite-translation h2 {
	font-size: clamp(32px, 5vw, 52px);
}
.edge-rewrite-translation p {
	max-width: 72ch;
	font-size: 17px;
}
.edge-rewrite-translation small {
	display: block;
	margin-top: 20px;
	color: var(--er-muted);
}

.edge-rewrite-pun-label {
	display: block;
	margin-bottom: 12px;
	color: var(--er-accent);
}

.edge-rewrite-pun-title {
	grid-column: 1 / -1 !important;
	width: 100% !important;
	max-width: none !important;
	margin: 48px 0 !important;
	padding-bottom: 22px !important;
	color: var(--er-accent) !important;
	border-bottom: 5px solid var(--er-accent) !important;
	font-family: var(--er-sans) !important;
	font-size: clamp(38px, 5vw, 60px) !important;
	font-weight: 700 !important;
	line-height: 0.98 !important;
	letter-spacing: -0.045em !important;
	text-wrap: balance;
}

.edge-rewrite-attribution {
	margin-top: 80px;
	padding: 56px 0 72px;
	border-top: 1px solid var(--er-line);
}

.edge-rewrite-attribution h2 {
	max-width: 16ch;
	font-size: clamp(30px, 4vw, 46px);
}
.edge-rewrite-attribution p {
	max-width: 72ch;
}
.edge-rewrite-attribution a {
	color: var(--er-accent);
}

body.edge-rewrite-home {
	width: 100%;
	max-width: 100vw;
	margin: 0;
	background: var(--er-canvas);
	color: var(--er-text);
	font-family: var(--er-sans);
	overflow-x: hidden;
}

.edge-rewrite-home main {
	width: min(calc(100% - 48px), 1200px);
	margin: 0 auto;
	padding: 72px 0 96px;
}

.edge-rewrite-home-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
	gap: 48px;
	align-items: end;
	padding-bottom: 64px;
}

.edge-rewrite-home h1 {
	max-width: 11ch;
	margin: 12px 0 0;
	font-size: clamp(52px, 8vw, 98px);
	font-weight: 700;
	line-height: 0.88;
	letter-spacing: -0.065em;
}

.edge-rewrite-home-hero p {
	margin: 0;
	color: var(--er-muted);
	font-size: 19px;
}

.edge-rewrite-experiences {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.edge-rewrite-card {
	display: flex;
	min-height: 260px;
	padding: 30px;
	flex-direction: column;
	background: var(--er-panel);
	border: 1px solid var(--er-line);
	color: var(--er-text);
	text-decoration: none;
	transition:
		transform 160ms ease,
		border-color 160ms ease;
}

.edge-rewrite-card:hover {
	transform: translate(-4px, -4px);
	border-color: var(--er-accent);
}
.edge-rewrite-card--wide {
	grid-column: 1 / -1;
	min-height: 220px;
	background: var(--er-accent);
	color: #fff;
}
.edge-rewrite-card h2 {
	margin: auto 0 10px;
	font-size: clamp(28px, 4vw, 44px);
	letter-spacing: -0.04em;
}
.edge-rewrite-card p {
	max-width: 52ch;
	margin: 0;
	color: var(--er-muted);
}
.edge-rewrite-card--wide p {
	color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 800px) {
	.edge-rewrite-mode,
	.edge-rewrite-button--ghost {
		display: none;
	}
	.edge-rewrite-location,
	.edge-rewrite-home-hero,
	.edge-rewrite-experiences {
		grid-template-columns: 1fr;
	}
	.edge-rewrite-location {
		gap: 28px;
		margin: 32px 0 48px;
	}
	.edge-rewrite-ray {
		margin-top: 0 !important;
	}
	.edge-rewrite-home main {
		padding-top: 48px;
	}
	.edge-rewrite-home-hero {
		padding-bottom: 48px;
	}
	.edge-rewrite-card--wide {
		grid-column: auto;
	}
	.edge-rewrite-card {
		min-width: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.edge-rewrite-card {
		transition: none;
	}
}
