@font-face {
	font-family: 'Bricolage';
	src: url('/fonts/bricolage.woff2') format('woff2');
	font-weight: 200 800;
	font-display: swap;
}
/* Night city: warm human amber against cold machine blue. */
:root {
	color-scheme: dark;
	--cold: 245;
	--bg: oklch(0.15 0.02 var(--cold));
	--bg-2: oklch(0.185 0.024 var(--cold));
	--surface: oklch(0.215 0.026 var(--cold));
	--surface-2: oklch(0.26 0.028 var(--cold));
	--line: oklch(0.33 0.03 var(--cold));
	--ink: oklch(0.96 0.008 80);
	--muted: oklch(0.76 0.02 var(--cold));
	--machine: oklch(0.8 0.09 230); /* the screens */
	--hot: oklch(0.7 0.19 45); /* the human: the tap, the Hour */
	--hot-deep: oklch(0.62 0.2 40);
	--hot-ink: oklch(0.17 0.03 40);
	--alive: oklch(0.8 0.17 150);
	--alive-bg: oklch(0.24 0.05 155);
	--r: 14px;
	--s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--wrap: 560px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 400 17px/1.55 'Bricolage', system-ui, sans-serif;
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
	letter-spacing: 0.005em;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--hot); color: var(--hot-ink); }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; height: clamp(360px, 46svh, 460px); display: flex; flex-direction: column; overflow: hidden; }
.hero-img, .hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-img img { object-fit: cover; object-position: 50% 40%; z-index: -2; animation: drift 24s var(--ease) both; }
.hero::after {
	content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background:
		linear-gradient(180deg, oklch(0.15 0.02 245 / 0.75) 0%, oklch(0.15 0.02 245 / 0) 22%),
		linear-gradient(0deg, var(--bg) 2%, oklch(0.15 0.02 245 / 0.72) 34%, oklch(0.15 0.02 245 / 0) 62%);
}
@keyframes drift { from { transform: scale(1.08); } to { transform: scale(1); } }

.top { width: 100%; max-width: 1200px; margin: 0 auto; padding: var(--s4) var(--s4); display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.mark { display: flex; align-items: center; gap: var(--s2); font-weight: 760; letter-spacing: -0.01em; text-decoration: none; font-size: 18px; text-shadow: 0 1px 12px oklch(0 0 0 / 0.5); }
.toplink { color: var(--ink); font-size: 15px; text-decoration: none; padding: var(--s2) var(--s3); border-radius: 999px; background: oklch(0.15 0.02 245 / 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background 200ms var(--ease); }
.toplink:hover { background: oklch(0.15 0.02 245 / 0.85); }
.tally { position: relative; display: inline-flex; gap: 3px; height: 20px; padding: 0 2px; }
.tally i { width: 3px; background: var(--ink); border-radius: 2px; }
.tally b { position: absolute; left: -2px; right: -2px; top: 8px; height: 3px; background: var(--hot); border-radius: 2px; transform: rotate(-24deg); }
.tally.sm { height: 14px; gap: 2px; margin-right: var(--s2); vertical-align: -2px; }
.tally.sm i { width: 2px; }
.tally.sm b { top: 6px; height: 2px; }

.count { margin-top: auto; width: 100%; max-width: var(--wrap); margin-left: auto; margin-right: auto; padding: 0 var(--s4) var(--s7); display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.num { display: flex; flex-direction: column; }
.num strong { font-size: clamp(48px, 14vw, 96px); line-height: 0.9; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; text-shadow: 0 2px 24px oklch(0 0 0 / 0.55); }
.num span { color: var(--ink); opacity: 0.86; font-size: 15px; margin-top: var(--s2); }
.num.alive strong { color: var(--alive); }

/* ---------- Layout ---------- */
main { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s4) var(--s8); }
.stage { position: relative; margin-top: calc(-1 * var(--s5)); display: grid; gap: var(--s4); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s5) var(--s5) var(--s6); animation: rise 600ms var(--ease) both; }
.card.hot { border-color: var(--hot); background: linear-gradient(180deg, oklch(0.25 0.05 45) 0%, var(--surface) 55%); }
.card.green { background: linear-gradient(180deg, var(--alive-bg), var(--surface) 70%); border-color: var(--alive); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

h1 { font-size: clamp(36px, 10vw, 56px); line-height: 0.98; letter-spacing: -0.035em; font-weight: 800; margin: 0 0 var(--s4); text-wrap: balance; }
h2 { font-size: clamp(26px, 6.5vw, 34px); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 var(--s4); font-weight: 780; text-wrap: balance; }
.lede { font-size: 17px; color: var(--ink); opacity: 0.92; margin: 0 0 var(--s5); text-wrap: pretty; }
.lede b { color: var(--hot); font-weight: 650; }
.you { color: var(--muted); margin: 0 0 var(--s3); font-size: 15px; }
.you b, .my-id2 { color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; font-weight: 700; }
.fine { color: var(--muted); font-size: 14px; margin: var(--s3) 0 0; min-height: 1em; }
.fine:empty { margin: 0; }
.note { color: var(--muted); margin: 0 0 var(--s5); }
.note b { color: var(--ink); }

/* ---------- Controls ---------- */
.field { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s4); }
.field span { font-size: 15px; color: var(--muted); }
select, input {
	font: inherit; color: var(--ink); background: var(--bg-2);
	border: 1px solid var(--line); border-radius: 10px; padding: var(--s3) var(--s4);
	min-height: 52px; width: 100%;
	transition: border-color 160ms var(--ease);
}
select { appearance: none; -webkit-appearance: none; padding-right: var(--s7); cursor: pointer;
	background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
	background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; }
select:hover, input:hover { border-color: var(--muted); }
select option, select optgroup { background: var(--surface); color: var(--ink); }
:focus-visible { outline: 3px solid var(--hot); outline-offset: 2px; }
input::placeholder { color: oklch(0.6 0.02 245); }

.tap {
	position: relative; display: grid; place-items: center; width: 100%; min-height: 100px;
	background: var(--hot); color: var(--hot-ink); border: 0; border-radius: var(--r);
	font: 800 46px/1 'Bricolage', system-ui, sans-serif; letter-spacing: -0.03em;
	cursor: pointer; touch-action: manipulation; overflow: hidden;
	box-shadow: 0 10px 40px -10px oklch(0.7 0.19 45 / 0.55);
	transition: transform 120ms var(--ease), box-shadow 200ms var(--ease), filter 160ms;
}
.tap::before { /* slow breathing glow: the one thing alive on the page */
	content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
	background: radial-gradient(120% 90% at 50% 120%, oklch(0.85 0.16 70 / 0.55), transparent 60%);
	animation: breathe 3.2s ease-in-out infinite;
}
.tap span { position: relative; }
.tap:hover { filter: brightness(1.06); box-shadow: 0 14px 50px -10px oklch(0.7 0.19 45 / 0.7); }
.tap:active { transform: scale(0.985); }
.tap[disabled] { opacity: 0.6; cursor: wait; }
@keyframes breathe { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

.btn {
	font: 680 17px/1 'Bricolage', system-ui, sans-serif; color: var(--bg); background: var(--ink);
	border: 0; border-radius: 999px; padding: var(--s4) var(--s5); min-height: 54px; cursor: pointer; width: 100%;
	transition: transform 120ms var(--ease), background 160ms var(--ease), opacity 160ms;
}
.btn:hover { background: oklch(1 0 0); }
.btn:active { transform: scale(0.985); }
.link { background: none; border: 0; padding: var(--s3) 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font: inherit; font-size: 15px; cursor: pointer; min-height: 44px; }
.link:hover { color: var(--ink); }
.ts { margin-top: var(--s3); }
.ts:empty { margin: 0; }

/* ---------- Waiting ---------- */
.bar { height: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.bar div { height: 100%; width: 0; background: linear-gradient(90deg, var(--hot-deep), var(--hot)); border-radius: inherit; transition: width 700ms var(--ease); }
.barlabel { margin: var(--s2) 0 var(--s5); color: var(--muted); font-size: 15px; }
.barlabel b { color: var(--ink); }

.hour { margin: 0 0 var(--s5); display: grid; gap: 0; border-top: 1px solid var(--line); }
.hour div { display: grid; grid-template-columns: 112px 1fr; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.hour dt { color: var(--muted); font-size: 15px; }
.hour dd { margin: 0; font-weight: 620; }

/* ---------- Group ---------- */
.code { font: 800 clamp(64px, 20vw, 88px)/1 'Bricolage', system-ui, sans-serif; letter-spacing: 0.14em; text-indent: 0.14em; text-align: center; padding: var(--s5) 0; margin: var(--s2) 0 var(--s5); border: 1.5px dashed var(--hot); border-radius: var(--r); color: var(--hot); background: oklch(0.7 0.19 45 / 0.07); font-variant-numeric: tabular-nums; }
.steps { padding: 0; margin: 0 0 var(--s5); list-style: none; counter-reset: s; display: grid; gap: var(--s3); }
.steps li { counter-increment: s; position: relative; padding-left: 40px; min-height: 28px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -1px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); color: var(--ink); font-weight: 700; font-size: 14px; }
.confirm { display: grid; grid-template-columns: 1fr auto; gap: var(--s2); }
.confirm input { text-transform: uppercase; letter-spacing: 0.24em; font-weight: 750; font-size: 22px; text-align: center; }
.confirm .btn { width: auto; background: var(--hot); color: var(--hot-ink); }
.others { list-style: none; padding: 0; margin: var(--s4) 0 0; display: flex; gap: var(--s2); flex-wrap: wrap; }
.others:empty { margin: 0; }
.others li { border: 1px solid var(--line); border-radius: 999px; padding: var(--s1) var(--s3); font-size: 14px; color: var(--muted); }
.others li.ok { border-color: var(--alive); color: var(--alive); font-weight: 650; }
.mine { margin: var(--s4) 0 var(--s1); }

/* ---------- Promo to the test ---------- */
.promo { position: relative; display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: var(--s4); text-decoration: none; padding: var(--s3); padding-right: var(--s4); border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); transition: border-color 200ms var(--ease), background 200ms var(--ease); }
.promo:hover { border-color: var(--machine); background: var(--surface); }
.promo picture, .promo img { width: 112px; height: 100%; min-height: 96px; object-fit: cover; object-position: 60% 50%; border-radius: 8px; }
.promo-t b { display: block; font-size: 18px; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: var(--s1); }
.promo-t span { display: block; color: var(--muted); font-size: 14px; line-height: 1.4; }

/* ---------- Lower sections ---------- */
.lower { margin-top: var(--s8); display: grid; gap: var(--s8); }
.cities ul { list-style: none; padding: 0; margin: 0; }
.cities li { display: grid; grid-template-columns: 1fr auto; gap: var(--s2) var(--s3); align-items: center; padding: var(--s3) 0; border-top: 1px solid var(--line); }
.cities li .nm { font-weight: 620; }
.cities li .ct { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 15px; }
.cities li .mini { grid-column: 1 / -1; height: 3px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.cities li .mini i { display: block; height: 100%; background: var(--hot); border-radius: inherit; }
.cities li.later .nm { color: var(--muted); font-weight: 400; }
.cities li.mine .nm::after { content: ' · you'; color: var(--hot); font-weight: 650; }

.how h2 + ol { margin-top: 0; }
.how ol { padding: 0; margin: 0 0 var(--s7); list-style: none; counter-reset: h; display: grid; gap: var(--s5); }
.how ol li { counter-increment: h; position: relative; padding-left: 52px; color: var(--muted); min-height: 40px; }
.how ol li::before { content: counter(h); position: absolute; left: 0; top: 0; font: 800 38px/1 'Bricolage', system-ui, sans-serif; color: var(--hot); letter-spacing: -0.04em; }
.how ol li b { color: var(--ink); display: block; font-size: 19px; margin-bottom: var(--s1); }
.how p { color: var(--muted); margin: 0 0 var(--s4); }
.how p:first-of-type { color: var(--ink); }
.foot { max-width: var(--wrap); margin: 0 auto; padding: var(--s6) var(--s4) var(--s7); color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

/* ---------- Human or AI test ---------- */
.hero-sm { height: 40svh; min-height: 260px; max-height: 520px; }
.hero-sm .hero-img img { object-position: 30% 50%; }
.quiz .stage { margin-top: calc(-1 * var(--s8)); }
.qbar { height: 4px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 0 0 var(--s5); }
.qbar i { display: block; height: 100%; width: 0; background: var(--hot); transition: width 400ms var(--ease); }
.quote { position: relative; margin: 0 0 var(--s5); font-size: 20px; line-height: 1.5; min-height: 7.5em; white-space: pre-line; padding: var(--s5); background: var(--bg-2); border-radius: 10px; }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.pick .btn { background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; min-height: 64px; font-size: 19px; }
.pick .pick-h:not([disabled]):hover { border-color: var(--hot); color: var(--hot); background: oklch(0.7 0.19 45 / 0.08); }
.pick .pick-a:not([disabled]):hover { border-color: var(--machine); color: var(--machine); background: oklch(0.8 0.09 230 / 0.08); }
.pick .btn.chosen { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pick .btn[disabled] { cursor: default; }
.pick .btn[disabled]:not(.chosen) { opacity: 0.4; }
.verdict { margin: var(--s4) 0 var(--s3); font-weight: 680; font-size: 18px; padding: var(--s3) var(--s4); border-radius: 10px; animation: rise 300ms var(--ease) both; }
.verdict.ok { color: var(--alive); background: oklch(0.8 0.17 150 / 0.1); }
.verdict.no { color: var(--hot); background: oklch(0.7 0.19 45 / 0.1); }
.btn.ghost { background: var(--hot); color: var(--hot-ink); }
.btn.ghost:hover { background: oklch(0.75 0.18 50); }
.flush { margin-top: 0; }
.tap-link { text-decoration: none; font-size: 30px; min-height: 96px; text-align: center; padding: 0 var(--s4); }
.has-banner { padding-top: 0; overflow: hidden; }
.banner { display: block; margin: 0 calc(-1 * var(--s5)) var(--s5); }
.banner img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 40%; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
#t-end .hour { margin-top: var(--s2); }
#t-final { font-size: clamp(64px, 20vw, 104px); color: var(--hot); }
.quiz .how { margin-top: var(--s8); }

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
	:root { --wrap: 600px; }
	.top { padding: var(--s5) var(--s6); }
	.hero { height: 720px; max-height: none; }
	.home .hero::after { background:
		linear-gradient(180deg, oklch(0.15 0.02 245 / 0.7) 0%, oklch(0.15 0.02 245 / 0) 18%),
		linear-gradient(90deg, oklch(0.15 0.02 245 / 0.55) 0%, oklch(0.15 0.02 245 / 0) 45%),
		linear-gradient(0deg, var(--bg) 1%, oklch(0.15 0.02 245 / 0.6) 26%, oklch(0.15 0.02 245 / 0) 55%); }
	.home .hero-img img { object-position: 50% 35%; }
	.count { max-width: 1200px; padding: 0 var(--s6) var(--s8); grid-template-columns: auto auto 1fr; gap: var(--s7); }
	.num strong { font-size: 120px; }
	.home main { max-width: 1200px; padding: 0 var(--s6) var(--s8); }
	.home .stage { width: min(var(--wrap), 50%); margin: -600px 0 0 auto; }
	.home .lower { grid-template-columns: 1fr 1.15fr; gap: var(--s8); align-items: start; margin-top: var(--s9); }
	.card { padding: var(--s7) var(--s7) var(--s6); }
	.has-banner { padding-top: 0; }
	.banner { margin: 0 calc(-1 * var(--s7)) var(--s5); }
	.quiz .stage { margin-top: calc(-1 * 180px); }
	.hero-sm { height: 56vh; max-height: 600px; }
	.foot { max-width: 1200px; padding: var(--s6); }
	.quiz .foot { max-width: var(--wrap); padding: var(--s6) var(--s4) var(--s7); }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
