/* Week 4: the ranked options, the vote and the route map. */

.answer--wide { max-width: 760px; }
.votehead { margin: var(--s-6) 0 var(--s-3); }
.votehead h2 { margin-bottom: var(--s-1); }
.votehead p { margin: 0; }

.results { margin-bottom: var(--s-6); }
.results__bar { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); align-items: center; justify-content: space-between; margin-bottom: var(--s-4); }
.viewpick { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 3px; }
.viewpick__tab { border: 0; background: transparent; color: var(--text-muted); font: inherit; font-weight: 600; font-size: var(--fs-sm); padding: var(--s-2) var(--s-4); border-radius: var(--radius-pill); cursor: pointer; min-height: 36px; }
.viewpick__tab[aria-selected=true] { background: var(--c-ink); color: var(--c-paper); }
.tradeoff { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-xs); color: var(--text-muted); flex: 1 1 260px; max-width: 360px; }
.tradeoff input { flex: 1; accent-color: var(--accent); }

.options { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .options { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
.option { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-4) var(--s-6) var(--s-6); }
.option--leading { border-color: color-mix(in srgb, var(--c-go) 55%, transparent); }
.option--locked { border: 2px solid var(--c-go); }
.option__head { display: flex; gap: var(--s-3); align-items: center; }
.option__head h3 { margin: 0; font-family: var(--font-display, var(--font-sans)); font-size: var(--fs-lg); }
.option__head p { margin: 0; font-size: var(--fs-sm); }
.option__head .pill { margin-left: auto; }
.option__rank { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--c-ink); color: var(--c-paper); }
.option__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin: 0; }
.option__facts div { display: flex; flex-direction: column; }
.option__facts dt { font-size: var(--fs-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.option__facts dd { margin: 0; font-size: var(--fs-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.option__warn { margin: 0; font-size: var(--fs-sm); color: var(--c-signal-ink); }
@media (prefers-color-scheme: dark) { .option__warn { color: var(--c-signal); } }
.option__votes { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); color: var(--text-muted); min-height: 28px; }
.tally strong { color: var(--text); font-size: var(--fs-md); }
.faces { display: flex; }
.faces .avatar + .avatar { margin-left: -6px; }
.avatar--sm { width: 26px; height: 26px; font-size: var(--fs-xs); background: var(--c-go); color: var(--c-paper); border: 2px solid var(--surface); }
.option__actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-2); margin-top: auto; }
.option__actions form.button_to:only-child { grid-column: 1 / -1; }
.option__actions form, .option__actions .button { width: 100%; }
.button--choice { background: var(--surface); color: var(--text); border: 1.5px solid var(--border); min-height: 44px; padding: var(--s-2) var(--s-3); font-size: var(--fs-sm); }
.button--choice:hover { background: var(--bg); }
.button--choice.is-picked { background: var(--c-ink); color: var(--c-paper); border-color: var(--c-ink); }

.fairness { padding: 0; overflow-x: auto; }
.fairness table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 480px; }
.fairness th, .fairness td { padding: var(--s-3); text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.fairness thead th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.fairness th small, .fairness td small { display: block; color: var(--text-muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.fairness tbody th { font-weight: 600; position: sticky; left: 0; background: var(--surface); }
.fairness tr.is-me th, .fairness tr.is-me td { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.fairness tfoot th, .fairness tfoot td { border-bottom: 0; }
.flag { font-size: var(--fs-xs); font-weight: 600; color: var(--c-signal-ink); background: color-mix(in srgb, var(--c-signal) 12%, transparent); border-radius: var(--radius-pill); padding: 1px 6px; white-space: nowrap; }

.routemap { padding: var(--s-4); }
.routemap svg { display: block; width: 100%; height: auto; }
.routemap__legend { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-3); }
.routemap__key { display: inline-flex; align-items: center; gap: var(--s-2); font: inherit; font-size: var(--fs-sm); font-weight: 600; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: var(--s-1) var(--s-3); cursor: pointer; min-height: 36px; }
.routemap__key[aria-pressed=true] { border-color: var(--text); }
.swatch { width: 10px; height: 10px; border-radius: 50%; }
.swatch--1, .routemap__routes--1 { --route: var(--c-signal); }
.swatch--2, .routemap__routes--2 { --route: var(--c-horizon); }
.swatch--3, .routemap__routes--3 { --route: var(--c-go); }
.swatch { background: var(--route); }
.routemap__grid { fill: none; stroke: var(--border); stroke-width: .5; }
.routemap__land { fill: color-mix(in srgb, var(--text) 8%, var(--surface)); stroke: none; }
.routemap__route { fill: none; stroke: var(--route, var(--text-muted)); stroke-width: 1.5; opacity: .18; }
.routemap__routes.is-on .routemap__route { opacity: .9; stroke-width: 2; }
.routemap__city { fill: var(--route); opacity: .4; }
.routemap__routes.is-on .routemap__city { opacity: 1; stroke: var(--surface); stroke-width: 2; }
.routemap__home { fill: var(--surface); stroke: var(--route); stroke-width: 2; }
.routemap__label { font: 600 12px var(--font-mono); fill: var(--text); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.routemap__label--city { font: 700 15px var(--font-sans); }
.routemap__empty { fill: var(--text-muted); font-size: 14px; }

.gate__note { background: color-mix(in srgb, var(--c-hold) 14%, var(--surface)); border-radius: var(--radius); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-3) !important; }
.gate__working { display: flex; gap: var(--s-3); align-items: flex-start; }
.gate .button { margin-top: var(--s-3); }
.spinner { flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; border: 2.5px solid var(--border); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* Week 5: the flight brief and the arrival timeline. */
.brief__search { display: grid; gap: 0; margin: 0; border: 1px solid var(--border); border-radius: var(--radius); }
.brief__search div { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--border); }
.brief__search div:last-child { border-bottom: 0; }
.brief__search dt { color: var(--text-muted); font-size: var(--fs-sm); }
.brief__search dd { margin: 0; display: flex; align-items: center; gap: var(--s-2); font-weight: 600; }
.copychip { font: inherit; font-size: var(--fs-xs); font-weight: 600; color: var(--link); background: transparent; border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 4px 10px; cursor: pointer; min-height: 32px; }
.brief__flight { background: var(--bg); border-radius: var(--radius); padding: var(--s-4); }
.brief__flight p { margin: 0 0 var(--s-2); }
.brief__route { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-lg); font-weight: 700; }

.timeline { margin-bottom: var(--s-4); padding: var(--s-6) var(--s-8); overflow: hidden; }
.timeline__axis { position: relative; height: 170px; margin: 0 var(--s-6); }
.timeline__axis::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--border); }
.timeline__point { position: absolute; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; }
.timeline__dot { width: 16px; height: 16px; border-radius: 50%; background: var(--c-go); border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--c-go); }
.timeline__point.is-planned .timeline__dot { background: var(--surface); box-shadow: 0 0 0 2px var(--c-hold); }
.timeline__label { position: absolute; bottom: 22px; white-space: nowrap; font-size: var(--fs-xs); color: var(--text-muted); }
.timeline__label strong { color: var(--text); }
.timeline__point.is-booked { z-index: 1; }
.timeline__point--lane1 .timeline__label { bottom: auto; top: 22px; }
.timeline__point--lane2 .timeline__label { bottom: 46px; }
.timeline__point--lane3 .timeline__label { bottom: auto; top: 46px; }
@media (max-width: 480px) { .timeline { padding: var(--s-4); } .timeline__label { font-size: 10px; } }
