feat: simplify the Cool City phone decision
ci / check (push) Successful in 54s
ci / check (pull_request) Successful in 56s

- replace the three stacked route cards with a Shortest | Shaded | Accessible segmented control and one large card
- default to Accessible for Ruth; keep the 16:00 trade-off visible as one sentence
- fold the audience vote into the card's primary action so the mobile action stays above the fold
- soften cards with a 28 px radius, soft shadow and one subtle selected ring
- leave the stage and city information architecture intact
This commit is contained in:
Noel Sabia committed 2026-11-14 14:15:28 +01:00
1 parent 2bc52a314d
commit d908c3264d
6 files changed
+382 -518

No files matched your search

+1 -124
View File
@@ -146,15 +146,6 @@ body.pc-cool-presentation,
padding: 0.4rem 0 0.7rem; padding: 0.4rem 0 0.7rem;
} }
.cc-ruth__label {
margin: 0;
color: var(--cc-muted);
font-size: 0.72rem;
font-weight: 650;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.cc-ruth h1 { .cc-ruth h1 {
max-width: 13ch; max-width: 13ch;
margin: 0; margin: 0;
@@ -233,83 +224,6 @@ body.pc-cool-presentation,
accent-color: var(--cc-shade); accent-color: var(--cc-shade);
} }
.cc-routes {
display: flex;
flex-direction: column;
gap: 0.2rem;
}
.cc-routes__head {
display: flex;
flex-wrap: wrap;
align-items: baseline;
justify-content: space-between;
gap: 0.45rem;
}
.cc-routes__head h2 {
margin: 0;
font-size: 1.55rem;
font-weight: 800;
letter-spacing: -0.04em;
line-height: 1;
}
.cc-model {
margin: 0;
color: var(--cc-muted);
font-size: 0.72rem;
line-height: 1.35;
}
.cc-model strong {
color: var(--cc-ink);
font-weight: 750;
}
.cc-vote {
display: flex;
flex-direction: column;
}
.cc-vote__head {
display: flex;
flex-wrap: wrap;
align-items: baseline;
justify-content: space-between;
gap: 0.45rem;
}
.cc-vote__head h2 {
margin: 0;
font-size: 1.45rem;
font-weight: 800;
letter-spacing: -0.04em;
}
.cc-vote__lede {
max-width: 52ch;
margin: 0.35rem 0 0.8rem;
color: var(--cc-muted);
font-size: 0.84rem;
line-height: 1.45;
}
.cc-vote__lede strong {
color: var(--cc-ink);
}
.cc-vote__status {
margin: 0.5rem 0 0;
color: var(--cc-muted);
font-size: 0.86rem;
line-height: 1.45;
}
.cc-vote__status strong {
color: var(--cc-ink);
}
.cc-vote-only { .cc-vote-only {
display: flex; display: flex;
min-height: calc(100dvh - 62px); min-height: calc(100dvh - 62px);
@@ -464,22 +378,6 @@ body.pc-cool-presentation,
font-size: 0.92rem; font-size: 0.92rem;
} }
.cc-vote__buttons,
.cc-vote-only__buttons {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 0.45rem;
}
.cc-vote__buttons :deep(.onyx-button),
.cc-vote-only__buttons :deep(.onyx-button) {
width: 100%;
}
.cc-vote__buttons :deep(.onyx-button__label) {
font-size: 0.84rem;
}
/* Stage ----------------------------------------------------------------- */ /* Stage ----------------------------------------------------------------- */
.cc-stage { .cc-stage {
@@ -564,7 +462,6 @@ body.pc-cool-presentation,
grid-template-areas: grid-template-areas:
"ruth routes" "ruth routes"
"time routes" "time routes"
"vote routes"
"details details" "details details"
"footer footer"; "footer footer";
gap: 1rem 1.5rem; gap: 1rem 1.5rem;
@@ -585,22 +482,10 @@ body.pc-cool-presentation,
grid-area: time; grid-area: time;
} }
.cc-vote { .cc-route {
grid-area: vote;
}
.cc-routes {
grid-area: routes; grid-area: routes;
} }
.cc-routes__head h2 {
font-size: 2rem;
}
.cc-routes .cc-route-list {
gap: 0.75rem;
}
.cc-details { .cc-details {
grid-area: details; grid-area: details;
margin-top: 0.5rem; margin-top: 0.5rem;
@@ -630,14 +515,6 @@ body.pc-cool-presentation,
.cc-phone { .cc-phone {
padding-inline: 0.8rem; padding-inline: 0.8rem;
} }
.cc-vote__buttons {
grid-template-columns: minmax(0, 1fr);
}
.cc-vote__buttons :deep(.onyx-button) {
min-height: 48px;
}
} }
@media (prefers-reduced-motion: reduce) { @media (prefers-reduced-motion: reduce) {
+123 -149
View File
@@ -1,60 +1,43 @@
<script setup lang="ts"> <script setup lang="ts">
import type { CoolRouteOption, CoolRouteValues } from '#shared/cool' import type { CoolRouteOption, CoolRouteValues } from '#shared/cool'
import { coolDistance, coolMinutes, coolShade, coolStops, coolValues, coolYesNo } from '~/utils/cool' import { coolDistance, coolMinutes, coolShade, coolStops, coolValues } from '~/utils/cool'
const props = withDefaults( const props = defineProps<{
defineProps<{
route: CoolRouteOption route: CoolRouteOption
values: CoolRouteValues | null values: CoolRouteValues | null
recommended?: boolean reason: string
selected?: boolean }>()
selectable?: boolean
}>(),
{ recommended: false, selected: false, selectable: false },
)
const emit = defineEmits<{ select: [id: CoolRouteOption['id']] }>()
const data = computed(() => coolValues(props.values)) const data = computed(() => coolValues(props.values))
const ramp = computed(() =>
props.route.ramp ? props.route.ramp.incline.replace('.0%', '%') : 'no ramp',
)
</script> </script>
<template> <template>
<component <article class="cc-route-card" :class="`cc-route-card--${route.id}`">
:is="selectable ? 'button' : 'article'" <div class="cc-route-card__head">
class="cc-route-card" <span class="cc-route-card__dot" aria-hidden="true" />
:class="[ <h3 class="cc-route-card__label">{{ route.label }}</h3>
`cc-route-card--${route.id}`, </div>
{ 'cc-route-card--recommended': recommended, 'cc-route-card--selected': selected },
]"
:type="selectable ? 'button' : undefined"
:aria-pressed="selectable ? selected : undefined"
@click="selectable ? emit('select', route.id) : undefined"
>
<span class="cc-route-card__line" aria-hidden="true" />
<span class="cc-route-card__head">
<span class="cc-route-card__label">{{ route.label }}</span>
<span v-if="recommended" class="cc-route-card__tag">Accessible for Ruth</span>
<span v-else-if="selected" class="cc-route-card__tag cc-route-card__tag--quiet">Selected</span>
</span>
<span class="cc-route-card__desc">{{ route.description }}</span>
<span class="cc-route-card__primary"> <p class="cc-route-card__reason">{{ reason }}</p>
<strong>{{ coolShade(data.shadePct) }}</strong> shade
<span class="cc-route-card__modeled">modelled</span>
<span class="cc-route-card__divider">·</span>
<strong>{{ coolMinutes(data.directSunMin) }}</strong> direct sun
</span>
<span class="cc-route-card__secondary"> <p class="cc-route-card__metrics">
{{ coolDistance(data.distanceM) }} · {{ coolMinutes(data.durationMin) }} · <span><strong>{{ coolShade(data.shadePct) }}</strong> shade</span>
<template v-if="route.ramp">{{ route.ramp.incline.replace('.0%', '%') }} ramp</template> <span><strong>{{ coolMinutes(data.directSunMin) }}</strong> direct sun</span>
<template v-else>no ramp</template> <span>{{ coolDistance(data.distanceM) }}</span>
</span> <span>{{ coolMinutes(data.durationMin) }}</span>
<span class="cc-route-card__metric-break" aria-hidden="true" />
<span>{{ ramp }}</span>
<span>water {{ coolStops(data.waterStops) }}</span>
<span>benches {{ coolStops(data.benchStops) }}</span>
</p>
<span class="cc-route-card__access"> <div class="cc-route-card__action">
Step-free {{ coolYesNo(data.stepFree) }} · Water {{ coolStops(data.waterStops) }} · <slot name="action" />
Benches {{ coolStops(data.benchStops) }} </div>
</span> </article>
</component>
</template> </template>
<style scoped> <style scoped>
@@ -63,138 +46,129 @@ const data = computed(() => coolValues(props.values))
width: 100%; width: 100%;
min-width: 0; min-width: 0;
flex-direction: column; flex-direction: column;
gap: 0.3rem; gap: 0.5rem;
padding: 0.95rem 1rem 0.85rem; padding: 1.1rem 1.15rem 1.05rem;
border: 1px solid var(--cc-line); border-radius: 28px;
border-radius: 24px;
background: var(--cc-surface, rgba(255, 255, 255, 0.86)); background: var(--cc-surface, rgba(255, 255, 255, 0.86));
box-shadow: var(--cc-shadow-soft); box-shadow:
0 0 0 1px color-mix(in srgb, var(--cc-shade) 24%, transparent),
0 18px 48px rgba(18, 18, 18, 0.08);
backdrop-filter: blur(20px) saturate(140%);
-webkit-backdrop-filter: blur(20px) saturate(140%);
color: var(--cc-ink); color: var(--cc-ink);
font: inherit;
text-align: left;
}
button.cc-route-card {
cursor: pointer;
}
button.cc-route-card:hover {
border-color: var(--cc-line-strong);
}
.cc-route-card:focus-visible {
outline: 3px solid var(--cc-focus);
outline-offset: 2px;
}
.cc-route-card--selected {
border-color: var(--cc-ink);
box-shadow: 0 0 0 2px var(--cc-ink), var(--cc-shadow-soft);
}
.cc-route-card--recommended {
border-color: var(--cc-shade);
}
.cc-route-card__line {
display: block;
width: 100%;
height: 4px;
margin-bottom: 0.25rem;
border-radius: 999px;
background: var(--cc-ink);
}
.cc-route-card--shortest .cc-route-card__line {
background: var(--cc-heat);
}
.cc-route-card--shaded .cc-route-card__line {
background: var(--cc-shade);
}
.cc-route-card--accessible .cc-route-card__line {
background: var(--cc-ink);
} }
.cc-route-card__head { .cc-route-card__head {
display: flex; display: flex;
flex-wrap: wrap;
align-items: center; align-items: center;
gap: 0.45rem; gap: 0.55rem;
} }
.cc-route-card__label { .cc-route-card__dot {
font-size: 1.18rem; display: block;
font-weight: 800; width: 0.5rem;
letter-spacing: -0.02em; height: 0.5rem;
} flex: 0 0 auto;
border-radius: 50%;
.cc-route-card__tag {
margin-inline-start: auto;
padding: 0.16rem 0.42rem;
border-radius: 999px;
background: var(--cc-shade);
color: #fff;
font-size: 0.6rem;
font-weight: 750;
letter-spacing: 0.04em;
}
.cc-route-card__tag--quiet {
background: var(--cc-ink); background: var(--cc-ink);
} }
.cc-route-card__desc { .cc-route-card--shortest .cc-route-card__dot {
color: var(--cc-muted); background: var(--cc-heat);
font-size: 0.8rem;
line-height: 1.35;
} }
.cc-route-card__primary { .cc-route-card--shaded .cc-route-card__dot {
margin-top: 0.25rem; background: var(--cc-shade);
color: var(--cc-ink); }
font-size: 1.05rem;
font-weight: 500; .cc-route-card__label {
line-height: 1.35; margin: 0;
font-size: clamp(1.7rem, 5.6vw, 2.5rem);
font-weight: 850;
letter-spacing: -0.045em;
line-height: 0.95;
}
.cc-route-card__reason {
max-width: 52ch;
margin: 0;
color: var(--cc-muted);
font-size: 0.88rem;
line-height: 1.4;
}
.cc-route-card__metrics {
display: flex;
flex-wrap: wrap;
gap: 0.15rem 0;
margin: 0.1rem 0 0;
color: var(--cc-ink-2);
font-size: 0.82rem;
line-height: 1.6;
font-variant-numeric: tabular-nums; font-variant-numeric: tabular-nums;
} }
.cc-route-card__primary strong { .cc-route-card__metrics > span {
font-size: 1.35rem; white-space: nowrap;
font-weight: 800;
letter-spacing: -0.03em;
} }
.cc-route-card__modeled { .cc-route-card__metrics > span:not(.cc-route-card__metric-break):not(:last-child)::after {
margin-inline-start: 0.2rem; content: "·";
color: var(--cc-muted); margin-inline: 0.55rem;
font-size: 0.58rem;
font-weight: 600;
letter-spacing: 0.03em;
text-transform: uppercase;
}
.cc-route-card__divider {
margin-inline: 0.25rem;
color: var(--cc-line-strong); color: var(--cc-line-strong);
} }
.cc-route-card__secondary, .cc-route-card__metric-break {
.cc-route-card__access { display: none;
color: var(--cc-muted);
font-size: 0.72rem;
line-height: 1.4;
font-variant-numeric: tabular-nums;
} }
.cc-route-card__access { .cc-route-card__metrics strong {
font-size: 0.68rem; color: var(--cc-ink);
font-weight: 750;
} }
@media (min-width: 760px) { .cc-route-card__action {
margin-top: 0.3rem;
}
.cc-route-card__action :deep(.onyx-button) {
width: 100%;
min-height: 52px;
border-radius: 999px;
font-family: var(--cc-font);
font-weight: 650;
letter-spacing: -0.01em;
}
.cc-route-card__action :deep(.onyx-button__label) {
font-size: 0.92rem;
}
@media (min-width: 640px) {
.cc-route-card { .cc-route-card {
padding: 1.05rem 1.1rem; padding: 1.35rem 1.45rem 1.3rem;
}
.cc-route-card__metric-break {
display: block;
flex-basis: 100%;
height: 0;
}
.cc-route-card__metrics > span:not(.cc-route-card__metric-break):has(+ .cc-route-card__metric-break)::after {
content: none;
}
.cc-route-card__action :deep(.onyx-button) {
width: auto;
min-width: 15rem;
}
}
@media (prefers-reduced-motion: reduce) {
.cc-route-card {
backdrop-filter: none;
-webkit-backdrop-filter: none;
} }
} }
</style> </style>
+4 -7
View File
@@ -59,7 +59,6 @@ useHead({
<main class="cc-city__main"> <main class="cc-city__main">
<header class="cc-city__head"> <header class="cc-city__head">
<p class="cc-city__kicker">Cooling gap · relative model</p>
<h1>Where the city should act first.</h1> <h1>Where the city should act first.</h1>
<p class="cc-city__lede"> <p class="cc-city__lede">
Eight sensor catchments, ranked by footfall, shade deficit, access deficit and vulnerability. Eight sensor catchments, ranked by footfall, shade deficit, access deficit and vulnerability.
@@ -101,8 +100,8 @@ useHead({
<section v-if="selected" class="cc-city__detail" aria-labelledby="help-title"> <section v-if="selected" class="cc-city__detail" aria-labelledby="help-title">
<div class="cc-city__detail-copy"> <div class="cc-city__detail-copy">
<p class="cc-city__kicker">Rank {{ selected.rank }} · {{ selected.sensor_name }}</p>
<h2 id="help-title">What would help</h2> <h2 id="help-title">What would help</h2>
<p class="cc-city__rankline">Rank {{ selected.rank }} · {{ selected.sensor_name }} · {{ selected.sensor_id }}</p>
<p class="cc-city__lede">{{ selected.reason }}</p> <p class="cc-city__lede">{{ selected.reason }}</p>
<ul class="cc-city__help"> <ul class="cc-city__help">
<li v-for="item in help" :key="item">{{ item }}</li> <li v-for="item in help" :key="item">{{ item }}</li>
@@ -164,13 +163,11 @@ useHead({
padding-bottom: 1.1rem; padding-bottom: 1.1rem;
} }
.cc-city__kicker { .cc-city__rankline {
margin: 0; margin: 0.25rem 0 0.3rem;
color: var(--cc-muted); color: var(--cc-muted);
font-size: 0.7rem; font-size: 0.7rem;
font-weight: 650; font-variant-numeric: tabular-nums;
letter-spacing: 0.06em;
text-transform: uppercase;
} }
.cc-city__head h1 { .cc-city__head h1 {
+227 -219
View File
@@ -1,6 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { COOL_ROUTE_IDS, COOL_ROUTE_LABELS, COOL_TIMES, isCoolRound } from '#shared/cool' import { COOL_ROUTE_IDS, COOL_ROUTE_LABELS, COOL_TIMES, isCoolRound } from '#shared/cool'
import type { CoolDemoState, CoolRouteId, CoolRound, CoolVoteTally } from '#shared/cool' import type { CoolDemoState, CoolRouteId, CoolRound, CoolVoteTally } from '#shared/cool'
import { coolMinutes, coolShade } from '~/utils/cool'
const route = useRoute() const route = useRoute()
const round = ref<CoolRound>(isCoolRound(route.query.round) ? route.query.round : 'preselection') const round = ref<CoolRound>(isCoolRound(route.query.round) ? route.query.round : 'preselection')
@@ -26,13 +27,6 @@ const timeIndex = computed({
}) })
const timeMarks = COOL_TIMES.map((time, index) => ({ value: index, label: time })) const timeMarks = COOL_TIMES.map((time, index) => ({ value: index, label: time }))
const modelLabel = computed(() => bundle.value.modelLabel) const modelLabel = computed(() => bundle.value.modelLabel)
const selectedLabel = computed(() => COOL_ROUTE_LABELS[state.value.selectedRoute])
const orderedRoutes = computed(() => {
const recommended = bundle.value.routes.find((item) => item.id === 'accessible')
return recommended
? [recommended, ...bundle.value.routes.filter((item) => item.id !== 'accessible')]
: bundle.value.routes
})
const myVoteLabel = computed(() => (myVote.value ? COOL_ROUTE_LABELS[myVote.value] : '')) const myVoteLabel = computed(() => (myVote.value ? COOL_ROUTE_LABELS[myVote.value] : ''))
const voteStatus = computed(() => { const voteStatus = computed(() => {
if (myVote.value) { if (myVote.value) {
@@ -42,14 +36,64 @@ const voteStatus = computed(() => {
return 'The vote opens when the presenter starts it.' return 'The vote opens when the presenter starts it.'
}) })
const routeReasons: Record<CoolRouteId, string> = {
shortest: 'Fastest, but a 15% ramp at the Marktplatz tram crossing.',
shaded: 'Twice as long, so more minutes in the sun.',
accessible: 'One minute longer, no ramp, water and benches.',
}
const routeOptions = COOL_ROUTE_IDS.map((id) => ({ value: id, label: COOL_ROUTE_LABELS[id] }))
// The phone opens on the model's route. The one pristine state is Shortest at
// 10:00; in that case show Accessible for Ruth. Any explicit stage choice wins.
const localRoute = ref<CoolRouteId>(
state.value.selectedRoute === 'shortest' && state.value.time === '10:00'
? 'accessible'
: state.value.selectedRoute,
)
let lastRemoteRoute = state.value.selectedRoute
const activeRoute = computed<CoolRouteId>({
get: () => localRoute.value,
set: (value) => {
localRoute.value = value
lastRemoteRoute = value
void update({ selectedRoute: value })
},
})
watch(
() => state.value.selectedRoute,
(value) => {
if (value === lastRemoteRoute) return
lastRemoteRoute = value
localRoute.value = value
},
)
const activeRouteOption = computed(
() => bundle.value.routes.find((item) => item.id === activeRoute.value) ?? bundle.value.routes[0],
)
const activeValues = computed(
() => activeRouteOption.value?.values[state.value.time] ?? null,
)
const tradeoff = computed(() => {
const shortest = bundle.value.routes.find((item) => item.id === 'shortest')
const shaded = bundle.value.routes.find((item) => item.id === 'shaded')
const accessible = bundle.value.routes.find((item) => item.id === 'accessible')
if (!shortest || !shaded || !accessible) return ''
const shortestValues = shortest.values[state.value.time]
const shadedValues = shaded.values[state.value.time]
const accessibleValues = accessible.values[state.value.time]
if (!shortestValues || !shadedValues || !accessibleValues) return ''
const shortestRamp = shortest.ramp ? shortest.ramp.incline.replace('.0%', '%') : 'no'
return `Shaded: ${coolShade(shadedValues.shadePct)} shade, but ${coolMinutes(shadedValues.directSunMin)} sun because it is twice as long. Shortest: ${coolMinutes(shortestValues.directSunMin)} sun, ${shortestRamp} ramp. Accessible: ${coolMinutes(accessibleValues.directSunMin)} sun, no ramp.`
})
function tooltipTime(value: number): string { function tooltipTime(value: number): string {
return COOL_TIMES[value] ?? '' return COOL_TIMES[value] ?? ''
} }
function selectRoute(id: CoolRouteId) {
void update({ selectedRoute: id })
}
function onSubmit(routeId: CoolRouteId) { function onSubmit(routeId: CoolRouteId) {
void vote(routeId) void vote(routeId)
} }
@@ -88,7 +132,6 @@ useHead({
<main v-if="voteOnly" class="cc-vote-only"> <main v-if="voteOnly" class="cc-vote-only">
<div class="cc-vote-only__inner"> <div class="cc-vote-only__inner">
<p class="cc-kicker">The room is voting</p>
<h1>Which route for Ruth?</h1> <h1>Which route for Ruth?</h1>
<p class="cc-vote-only__lede">Shortest, shaded, or accessible? One tap. No name, no location.</p> <p class="cc-vote-only__lede">Shortest, shaded, or accessible? One tap. No name, no location.</p>
@@ -115,9 +158,8 @@ useHead({
<main v-else class="cc-phone"> <main v-else class="cc-phone">
<section class="cc-ruth" aria-labelledby="ruth-title"> <section class="cc-ruth" aria-labelledby="ruth-title">
<p class="cc-ruth__label">Ruth, 78 · lives alone</p>
<h1 id="ruth-title">Ruth, 78, needs to reach Marktplatz.</h1> <h1 id="ruth-title">Ruth, 78, needs to reach Marktplatz.</h1>
<p class="cc-ruth__copy">It is a hot day in Heilbronn. She needs bread. The city knows where the cool places are; it does not give her a way there.</p> <p class="cc-ruth__copy">A hot day in Heilbronn. She needs bread.</p>
<span class="cc-ruth__tag">Composite persona — illustrative, not a real person</span> <span class="cc-ruth__tag">Composite persona — illustrative, not a real person</span>
</section> </section>
@@ -138,59 +180,57 @@ useHead({
<p class="cc-fine">Modeled shade, not measured. The stage follows this time.</p> <p class="cc-fine">Modeled shade, not measured. The stage follows this time.</p>
</section> </section>
<section class="cc-routes" aria-labelledby="routes-title"> <section class="cc-route" aria-labelledby="route-title">
<div class="cc-routes__head"> <div class="cc-route__head">
<h2 id="routes-title">Three ways to Marktplatz.</h2> <h2 id="route-title">Which route for Ruth?</h2>
<p class="cc-model">Model recommendation: <strong>{{ modelLabel }}</strong></p> <p class="cc-route__model">Model recommendation · <strong>{{ modelLabel }}</strong></p>
</div> </div>
<p class="cc-routes__hint">Shade percentage and direct-sun minutes are different. Tap a route to highlight it on the stage.</p>
<div class="cc-route-list"> <OnyxSegmentedControl
v-model="activeRoute"
class="cc-route__segment"
aria-label="Route"
name="cool-route"
:options="routeOptions"
/>
<CoolRouteCard <CoolRouteCard
v-for="routeOption in orderedRoutes" v-if="activeRouteOption"
:key="routeOption.id" :route="activeRouteOption"
:route="routeOption" :values="activeValues"
:values="routeOption.values[state.time] ?? null" :reason="routeReasons[activeRoute]"
:recommended="routeOption.id === 'accessible'" >
:selected="state.selectedRoute === routeOption.id" <template #action>
selectable <div v-if="myVote" class="cc-route__vote-status" role="status">
@select="selectRoute" <strong>You chose {{ myVoteLabel }}.</strong>
/> <span>One vote per browser.</span>
</div> </div>
<p class="cc-fine">Selected: {{ selectedLabel }}. The stage and this phone share the same route and time.</p>
</section>
<section class="cc-panel cc-vote" aria-labelledby="vote-title">
<div class="cc-vote__head">
<h2 id="vote-title">Which route for Ruth?</h2>
<span class="cc-chip">One vote per browser</span>
</div>
<p class="cc-vote__lede">The room chooses. The model recommends <strong>{{ modelLabel }}</strong>.</p>
<div v-if="!myVote && state.voteOpen" class="cc-vote__buttons">
<OnyxButton <OnyxButton
v-for="id in COOL_ROUTE_IDS" v-else-if="state.voteOpen"
:key="id" :label="`Vote for ${activeRouteOption?.label ?? activeRoute}`"
:label="COOL_ROUTE_LABELS[id]" color="primary"
mode="outline"
:disabled="busy" :disabled="busy"
@click="onSubmit(id)" @click="onSubmit(activeRoute)"
/> />
</div> <p v-else class="cc-route__vote-status cc-route__vote-status--quiet">
<p v-else class="cc-vote__status" role="status"> Voting opens when the presenter starts it.
<template v-if="myVote">You chose <strong>{{ myVoteLabel }}</strong>.</template>
<template v-else>{{ voteStatus }}</template>
</p> </p>
<p v-if="tally && myVote" class="cc-fine">{{ tally.total }} {{ tally.total === 1 ? 'vote' : 'votes' }} in this room. Aggregate only.</p>
<p v-if="voteError" class="cc-error" role="alert">{{ voteError }}</p> <p v-if="voteError" class="cc-error" role="alert">{{ voteError }}</p>
</template>
</CoolRouteCard>
<p v-if="tradeoff" class="cc-route__tradeoff">
<span class="cc-route__tradeoff-label">The trade-off at {{ state.time }}</span>
{{ tradeoff }}
</p>
</section> </section>
<details class="cc-details"> <details class="cc-details">
<summary>Details</summary> <summary>Details</summary>
<div class="cc-details__body"> <div class="cc-details__body">
<p><strong>Shade is modeled, not measured.</strong> The model uses NOAA solar position, building footprints and tree canopies on 14 Aug 2026, a 35°C clear-sky day.</p> <p><strong>Shade is modeled, not measured.</strong> NOAA solar position, building footprints and tree canopies on 14 Aug 2026, a 35°C clear-sky day.</p>
<p><strong>Shade percentage is not the whole exposure.</strong> At 16:00 the shaded route has 50.0% shade but 4.9 direct-sun minutes because it is 732 m / 9.8 min. The shortest is 359 m / 4.8 min, 43.8% shade, 2.7 direct-sun minutes, but it has a 15% ramp at the Marktplatz tram crossing. The accessible route is 438 m / 5.8 min, 43.8% shade, 3.3 direct-sun minutes, no ramp, water and benches.</p> <p><strong>At 16:00:</strong> Shortest 359.5 m / 4.8 min, 43.8% shade, 2.7 min direct sun, 15% ramp. Shaded 732.3 m / 9.8 min, 50.0% shade, 4.9 min direct sun. Accessible 438.2 m / 5.8 min, 43.8% shade, 3.3 min direct sun, no ramp, water 2, benches 6.</p>
<p><strong>The city data is a relative index.</strong> Estimated devices, not people. No city-wide heatmap.</p> <p><strong>All three routes are step-free.</strong> The 15% ramp is at the Marktplatz tram crossing. The city data is a relative index: estimated devices, not people.</p>
<p class="cc-details__links"> <p class="cc-details__links">
<NuxtLink to="/cool/city">How this works</NuxtLink> <NuxtLink to="/cool/city">How this works</NuxtLink>
<NuxtLink to="/plan">Retail module</NuxtLink> <NuxtLink to="/plan">Retail module</NuxtLink>
@@ -208,28 +248,6 @@ useHead({
</template> </template>
<style scoped> <style scoped>
.cc-kicker {
margin: 0 0 0.7rem;
color: var(--cc-muted);
font-size: 0.78rem;
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.cc-routes__hint {
max-width: 52ch;
margin: 0 0 0.8rem;
color: var(--cc-muted);
font-size: 0.82rem;
line-height: 1.45;
}
.cc-route-list {
display: grid;
gap: 0.65rem;
}
.cc-fine { .cc-fine {
margin: 0.35rem 0 0; margin: 0.35rem 0 0;
color: var(--cc-muted); color: var(--cc-muted);
@@ -243,169 +261,159 @@ useHead({
font-size: 0.78rem; font-size: 0.78rem;
} }
.cc-chip {
padding: 0.2rem 0.5rem;
border: 1px solid var(--cc-line);
border-radius: 999px;
color: var(--cc-muted);
font-size: 0.62rem;
font-weight: 650;
white-space: nowrap;
}
.cc-selected {
color: var(--cc-ink);
font-size: 0.78rem;
font-weight: 600;
}
.cc-vote__lede {
max-width: 52ch;
margin: 0.3rem 0 0.8rem;
color: var(--cc-muted);
font-size: 0.85rem;
line-height: 1.45;
}
.cc-vote__lede strong {
color: var(--cc-ink);
}
.cc-vote__buttons,
.cc-vote-only__buttons { .cc-vote-only__buttons {
display: grid; grid-template-columns: minmax(0, 1fr);
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 0.45rem;
} }
.cc-vote__buttons :deep(.onyx-button),
.cc-vote-only__buttons :deep(.onyx-button) { .cc-vote-only__buttons :deep(.onyx-button) {
width: 100%; width: 100%;
min-height: 52px; min-height: 52px;
border-radius: 999px; border-radius: 999px;
font-size: 0.92rem;
}
.cc-vote__status {
margin: 0;
color: var(--cc-muted);
font-size: 0.85rem;
line-height: 1.45;
}
.cc-vote__status strong {
color: var(--cc-ink);
}
.cc-vote-only {
display: flex;
min-height: calc(100dvh - 60px);
align-items: center;
justify-content: center;
padding: 2rem 1rem 3rem;
}
.cc-vote-only__inner {
width: 100%;
max-width: 34rem;
}
.cc-vote-only h1 {
max-width: 10ch;
margin: 0;
font-size: clamp(3rem, 12vw, 5rem);
font-weight: 850;
letter-spacing: -0.05em;
line-height: 0.9;
}
.cc-vote-only__lede {
max-width: 34ch;
margin: 0.8rem 0 1.4rem;
color: var(--cc-muted);
font-size: 1rem;
line-height: 1.45;
}
.cc-vote-only__buttons {
grid-template-columns: minmax(0, 1fr);
}
.cc-vote-only__confirmation {
padding: 1rem;
border: 1px solid var(--cc-line);
border-radius: 24px;
background: var(--cc-surface);
}
.cc-vote-only__confirmation p {
margin: 0;
font-size: 1rem;
line-height: 1.45;
}
.cc-details {
border: 1px solid var(--cc-line);
border-radius: 24px;
background: var(--cc-surface);
}
.cc-details summary {
padding: 0.9rem 1rem;
color: var(--cc-ink);
font-size: 0.82rem;
font-weight: 650; font-weight: 650;
cursor: pointer;
} }
.cc-details__body { .cc-route {
display: grid; display: flex;
gap: 0.6rem; flex-direction: column;
padding: 0 1rem 1rem; gap: 0.75rem;
color: var(--cc-muted);
font-size: 0.82rem;
line-height: 1.55;
} }
.cc-details__body p { .cc-route__head h2 {
margin: 0; margin: 0;
font-size: clamp(1.5rem, 5.2vw, 1.9rem);
font-weight: 850;
letter-spacing: -0.045em;
line-height: 1;
} }
.cc-details__body strong { .cc-route__model {
color: var(--cc-ink); margin: 0.3rem 0 0;
}
.cc-details__links {
display: flex;
flex-wrap: wrap;
gap: 0.8rem;
padding-top: 0.3rem;
}
.cc-details__links a {
color: var(--cc-ink);
font-weight: 700;
}
.cc-phone__footer {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 0.4rem 1rem;
padding-top: 1.1rem;
border-top: 1px solid var(--cc-line);
color: var(--cc-muted); color: var(--cc-muted);
font-size: 0.68rem; font-size: 0.74rem;
line-height: 1.45; line-height: 1.35;
}
.cc-route__model strong {
color: var(--cc-ink);
font-weight: 750;
}
.cc-route__segment {
width: 100%;
}
.cc-route__segment :deep(.onyx-segmented-control) {
display: grid;
max-width: none;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 0.18rem;
padding: 0.22rem;
overflow: visible;
border: 1px solid var(--cc-line);
border-radius: 999px;
background: color-mix(in srgb, var(--cc-ink) 5%, var(--cc-surface-solid));
}
.cc-route__segment :deep(.onyx-segmented-control-element) {
border-radius: 999px;
background: transparent;
color: var(--cc-ink-2);
font-family: var(--cc-font);
font-weight: 650;
}
.cc-route__segment :deep(.onyx-segmented-control-element__label) {
min-width: 0;
min-height: 42px;
align-items: center;
padding: 0.3rem 0.35rem;
font-size: 0.8rem;
font-weight: inherit;
}
.cc-route__segment :deep(.onyx-segmented-control-element:hover) {
color: var(--cc-ink);
background: color-mix(in srgb, var(--cc-ink) 4%, transparent);
}
.cc-route__segment :deep(.onyx-segmented-control-element:has(.onyx-segmented-control-element__input:checked)) {
background: var(--cc-ink);
color: var(--cc-ground);
}
.cc-route__segment :deep(.onyx-segmented-control-element:has(.onyx-segmented-control-element__input:checked):hover) {
background: var(--cc-ink);
color: var(--cc-ground);
}
.cc-route__segment :deep(.onyx-segmented-control-element:has(.onyx-segmented-control-element__input:focus-visible)) {
outline: 2px solid var(--cc-focus);
outline-offset: 2px;
}
.cc-route__vote-status {
display: flex;
min-height: 48px;
flex-wrap: wrap;
align-content: center;
align-items: baseline;
gap: 0.3rem 0.55rem;
color: var(--cc-muted);
font-size: 0.84rem;
line-height: 1.4;
}
.cc-route__vote-status strong {
color: var(--cc-ink);
font-weight: 750;
}
.cc-route__vote-status--quiet {
display: block;
padding-block: 0.65rem;
}
.cc-route__tradeoff {
max-width: 62ch;
margin: 0;
color: var(--cc-muted);
font-size: 0.78rem;
line-height: 1.5;
}
.cc-route__tradeoff-label {
display: block;
margin-bottom: 0.15rem;
color: var(--cc-ink);
font-size: 0.64rem;
font-weight: 700;
letter-spacing: 0.04em;
text-transform: uppercase;
}
@media (min-width: 900px) {
.cc-route {
gap: 0.9rem;
}
.cc-route__head h2 {
font-size: 2rem;
}
.cc-route__segment {
max-width: 30rem;
}
.cc-route__tradeoff {
font-size: 0.8rem;
}
} }
@media (max-width: 420px) { @media (max-width: 420px) {
.cc-vote__buttons { .cc-route__vote-status {
grid-template-columns: minmax(0, 1fr); display: block;
} min-height: 0;
padding-block: 0.25rem;
.cc-vote__buttons :deep(.onyx-button) {
min-height: 48px;
} }
} }
</style> </style>
+26 -19
View File
@@ -181,15 +181,15 @@ useHead({
Cool City Cool City
</NuxtLink> </NuxtLink>
<span class="cc-stage__place">Heilbronn</span> <span class="cc-stage__place">Heilbronn</span>
<span class="cc-stage__round">Round {{ round }} · {{ time }}</span> <span class="cc-stage__round">Round {{ round }} · {{ time }} · modeled {{ bundle.hotDay ? formatDate(bundle.hotDay.date) : 'hot day' }}</span>
</header> </header>
<section v-if="scene === 'ruth'" class="cc-stage__ruth" aria-labelledby="stage-ruth-title"> <section v-if="scene === 'ruth'" class="cc-stage__ruth" aria-labelledby="stage-ruth-title">
<div class="cc-stage__ruth-card"> <div class="cc-stage__ruth-card">
<p class="cc-stage__eyebrow">A composite persona · not a real person</p> <h1 id="stage-ruth-title" class="cc-stage__ruth-name">Ruth, 78</h1>
<p class="cc-stage__ruth-name">Ruth, 78</p>
<p class="cc-stage__ruth-live">Lives alone.</p> <p class="cc-stage__ruth-live">Lives alone.</p>
<h1 id="stage-ruth-title">It is a hot day in Heilbronn. She needs bread from Marktplatz.</h1> <p class="cc-stage__ruth-copy">It is a hot day in Heilbronn. She needs bread from Marktplatz.</p>
<p class="cc-stage__ruth-tag">Composite persona — not a real person</p>
</div> </div>
<div class="cc-stage__ruth-qr"> <div class="cc-stage__ruth-qr">
<div class="cc-stage__qr-frame"> <div class="cc-stage__qr-frame">
@@ -204,7 +204,6 @@ useHead({
<CoolPlacesMap :places="coolPlaces" stage /> <CoolPlacesMap :places="coolPlaces" stage />
</div> </div>
<aside class="cc-stage__places-panel"> <aside class="cc-stage__places-panel">
<p class="cc-stage__eyebrow">Cool places</p>
<h1 id="stage-places-title">The city knows where the cool places are.</h1> <h1 id="stage-places-title">The city knows where the cool places are.</h1>
<p class="cc-stage__places-count">{{ coolPlaces.length }} official cool places in the dataset</p> <p class="cc-stage__places-count">{{ coolPlaces.length }} official cool places in the dataset</p>
<ul class="cc-stage__places-list"> <ul class="cc-stage__places-list">
@@ -225,7 +224,6 @@ useHead({
<div class="cc-stage__shade" aria-hidden="true" /> <div class="cc-stage__shade" aria-hidden="true" />
<div class="cc-stage__content"> <div class="cc-stage__content">
<p class="cc-stage__eyebrow">Stadtgalerie → Marktplatz · modeled shade · {{ bundle.hotDay ? formatDate(bundle.hotDay.date) : 'hot day' }}</p>
<h1 class="cc-stage__headline">{{ headline }}</h1> <h1 class="cc-stage__headline">{{ headline }}</h1>
<p v-if="scene !== 'coda'" class="cc-stage__reveal">{{ reveal }}</p> <p v-if="scene !== 'coda'" class="cc-stage__reveal">{{ reveal }}</p>
@@ -338,8 +336,8 @@ useHead({
<div v-if="honestyOpen" class="cc-stage__honesty" role="dialog" aria-modal="true" aria-labelledby="honesty-title"> <div v-if="honestyOpen" class="cc-stage__honesty" role="dialog" aria-modal="true" aria-labelledby="honesty-title">
<div class="cc-stage__honesty-card"> <div class="cc-stage__honesty-card">
<p class="cc-stage__eyebrow">Data honesty</p> <h2 id="honesty-title">Data honesty</h2>
<h2 id="honesty-title">Estimated devices, not people.</h2> <p class="cc-stage__honesty-lead">Estimated devices, not people.</p>
<p>A relative activity index, not a census.</p> <p>A relative activity index, not a census.</p>
<div class="cc-stage__clock" aria-hidden="true"> <div class="cc-stage__clock" aria-hidden="true">
<span class="cc-stage__clock-scan" /> <span class="cc-stage__clock-scan" />
@@ -373,15 +371,6 @@ useHead({
max-width: 58rem; max-width: 58rem;
} }
.cc-stage__eyebrow {
margin: 0 0 0.8rem;
color: var(--cc-muted);
font-size: clamp(0.7rem, 0.9vw, 0.9rem);
font-weight: 650;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.cc-stage__ruth-name { .cc-stage__ruth-name {
margin: 0; margin: 0;
color: var(--cc-ink); color: var(--cc-ink);
@@ -398,8 +387,8 @@ useHead({
font-weight: 750; font-weight: 750;
} }
.cc-stage__ruth-card h1 { .cc-stage__ruth-copy {
max-width: 18ch; max-width: 22ch;
margin: 1.4rem 0 0; margin: 1.4rem 0 0;
color: var(--cc-ink); color: var(--cc-ink);
font-size: clamp(1.6rem, 2.6vw, 2.7rem); font-size: clamp(1.6rem, 2.6vw, 2.7rem);
@@ -408,6 +397,16 @@ useHead({
line-height: 1.1; line-height: 1.1;
} }
.cc-stage__ruth-tag {
width: fit-content;
margin: 1rem 0 0;
padding: 0.2rem 0.55rem;
border: 1px solid var(--cc-line);
border-radius: 999px;
color: var(--cc-muted);
font-size: 0.68rem;
}
.cc-stage__ruth-qr { .cc-stage__ruth-qr {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -943,6 +942,14 @@ useHead({
line-height: 1.45; line-height: 1.45;
} }
.cc-stage__honesty-lead {
color: var(--cc-ink) !important;
font-size: clamp(1.6rem, 2.4vw, 2.4rem) !important;
font-weight: 750;
letter-spacing: -0.03em;
line-height: 1.05 !important;
}
.cc-stage__clock { .cc-stage__clock {
position: relative; position: relative;
display: grid; display: grid;
+1
View File
@@ -41,6 +41,7 @@ export function coolValues(values: CoolRouteValues | null | undefined): CoolRout
stepFree: null, stepFree: null,
waterStops: null, waterStops: null,
benchStops: null, benchStops: null,
rampInclinePct: null,
} }
) )
} }