/* How far apart are we: two city inputs, a neutral answer, the couple card (canvas), fair halfway cities and whose turn it is. */
.tool .ha { --ha-muted: rgb(var(--ink) / .72); --ha-line: rgb(var(--ink) / .1); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tool .ha-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; position: relative; }
.tool .ha-person { padding: 8px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--ha-line); }
.tool .ha-person .u01-picker input { font-weight: 800; box-shadow: none; padding-right: 56px; }
.tool .ha-swap { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 22px; background: rgb(var(--ink)); color: var(--surface); box-shadow: 0 0 0 4px var(--surface); transition: transform .2s var(--ease-out); }
.tool .ha-swap:active { transform: translateY(-50%) scale(.94); }
@media (min-width: 600px) {
  .tool .ha-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .tool .ha-swap { left: 50%; right: auto; transform: translate(-50%, -50%) rotate(90deg); }
  .tool .ha-swap:active { transform: translate(-50%, -50%) rotate(90deg) scale(.94); }
  .tool .ha-person .u01-picker input { padding-right: 16px; }
  .tool .ha-form .ha-person:last-of-type .u01-picker input { padding-left: 28px; }
}
.tool .ha .tool-chips button { min-height: 44px; }
.tool .ha-units .tool-chips button { min-height: 40px; padding: 0 14px; font-size: 13px; }
.tool .ha-answer { padding: 18px 20px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.tool .ha-big { font-size: 20px; line-height: 28px; font-weight: 800; color: var(--ha-muted); }
.tool .ha-big b { font-size: 44px; line-height: 52px; font-weight: 950; letter-spacing: -.03em; color: rgb(var(--ink)); font-variant-numeric: tabular-nums; }
.tool .ha-sub { font-size: 15px; line-height: 22px; color: var(--ha-muted); }
.tool .ha-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.tool .ha-tile { padding: 12px 14px; border-radius: 16px; background: rgb(var(--accent) / .07); display: flex; flex-direction: column; gap: 2px; }
.tool .ha-tile.is-wide { grid-column: 1 / -1; }
.tool .ha-tile b { font-size: 22px; line-height: 28px; font-weight: 950; color: rgb(var(--ink)); font-variant-numeric: tabular-nums; }
.tool .ha-tile span { font-size: 13px; line-height: 18px; font-weight: 700; color: var(--ha-muted); }
.tool .ha-fine { margin-top: 8px; font-size: 13px; line-height: 18px; color: var(--ha-muted); }
.tool .ha-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.tool .ha-card-head { display: flex; flex-direction: column; gap: 8px; }
.tool details.ha-names summary { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 20px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 800; color: var(--link); background: rgb(var(--accent) / .1); }
.tool details.ha-names summary::-webkit-details-marker { display: none; }
.tool .ha-names-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.tool .ha-canvas { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; border-radius: 24px; box-shadow: 0 0 0 1px rgb(var(--ink) / .06), 0 12px 32px rgb(38 8 64 / .16); background: var(--surface-2); }
.tool .ha-card-opts { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tool .ha-card-opts .tool-chips { justify-content: center; }
.tool .ha-card-opts .tool-chips button { min-height: 40px; padding: 0 12px; font-size: 13px; }
.tool .ha-actions .btn { flex: 1 1 auto; white-space: nowrap; }
.tool .ha-half, .tool .ha-visits { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.tool .ha-mid, .tool .ha-note { font-size: 15px; line-height: 22px; color: rgb(var(--ink) / .82); }
.tool .ha-places { display: grid; gap: 8px; counter-reset: ha; }
.tool .ha-places li { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 12px 48px; border-radius: 18px; background: rgb(var(--accent) / .06); position: relative; counter-increment: ha; }
.tool .ha-places li::before { content: counter(ha); position: absolute; left: 14px; top: 12px; width: 24px; height: 24px; border-radius: 12px; display: grid; place-items: center; background: rgb(var(--ink)); color: var(--surface); font-size: 13px; font-weight: 900; }
.tool .ha-place { display: flex; align-items: baseline; gap: 4px 8px; flex-wrap: wrap; }
.tool .ha-place b { font-size: 17px; line-height: 24px; font-weight: 900; color: rgb(var(--ink)); }
.tool .ha-iata { font-size: 12px; font-weight: 850; letter-spacing: .06em; color: var(--ha-muted); padding: 0 6px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--ha-line); }
.tool .ha-tz { font-size: 13px; font-weight: 700; color: var(--ha-muted); }
.tool .ha-legs { display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 14px; line-height: 20px; color: var(--ha-muted); }
.tool .ha-legs b { color: rgb(var(--ink)); font-weight: 850; font-variant-numeric: tabular-nums; }
.tool .ha-turn { font-size: 16px; line-height: 24px; color: rgb(var(--ink) / .85); }
.tool .ha-turn b { color: var(--link); }
@media (min-width: 600px) { .tool .ha-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } .tool .ha-tile.is-wide { grid-column: auto; } .tool .ha-card-head { flex-direction: row; align-items: center; justify-content: space-between; } }
@media (max-width: 599px) {
  .tool .ha-big b { font-size: 36px; line-height: 44px; }
  .tool .ha-half, .tool .ha-visits, .tool .ha-answer { padding: 16px; }
  .tool .ha-actions { display: grid; grid-template-columns: 1fr; }
}
/* Round 2 */
.tool .ha-fair { font-size: 13px; line-height: 18px; font-weight: 800; color: var(--link); }
.tool .ha-tiles { grid-auto-rows: 1fr; }
.tool .ha-tile b { white-space: nowrap; font-size: 20px; }
.tool .ha-card-opts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; justify-items: stretch; }
.tool .ha-opt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tool .ha-opt .tool-label { min-width: 48px; }
.tool .ha-opt .tool-chips { justify-content: flex-start; }
.tool .ha-when { display: flex; flex-direction: column; gap: 6px; max-width: 280px; }
.tool .ha-since { display: flex; align-items: baseline; gap: 10px; padding: 12px 16px; border-radius: 16px; background: rgb(var(--accent) / .08); }
.tool .ha-since b { font-size: 32px; line-height: 38px; font-weight: 950; color: rgb(var(--ink)); font-variant-numeric: tabular-nums; }
.tool .ha-since span { font-size: 15px; font-weight: 750; color: rgb(var(--ink) / .8); }
@media (max-width: 599px) {
  .tool .ha-form { grid-template-columns: minmax(0, 1fr) 44px; column-gap: 8px; }
  .tool .ha-form .ha-person { grid-column: 1; }
  .tool .ha-swap { position: static; grid-column: 2; grid-row: 1 / span 2; align-self: center; transform: none; box-shadow: none; }
  .tool .ha-swap:active { transform: scale(.94); }
  .tool .ha-person .u01-picker input { padding-right: 16px; }
}
/* Round 3 */
.tool .ha-halfmap-wrap { border-radius: 18px; overflow: hidden; background: #ECDDFB; }
.tool .ha-halfmap { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.tool .ha-places li { cursor: pointer; transition: background-color .15s ease; outline: 0; }
.tool .ha-places li:focus-visible { box-shadow: 0 0 0 3px rgb(var(--accent) / .5); }
@media (hover: hover) { .tool .ha-places li:hover { background: rgb(var(--accent) / .12); } }
.tool .ha-names input[type="text"] { margin-top: 8px; }
.tool .ha-rhythm { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 16px; background: rgb(var(--accent) / .06); }
.tool .ha-rhythm .tool-chips button { min-height: 40px; padding: 0 12px; font-size: 13px; }
.tool .ha-rhythm-out { font-size: 15px; line-height: 22px; color: rgb(var(--ink) / .85); }
@media (min-width: 900px) {
  .tool .ha-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; align-items: start; }
  .tool .ha-card-head { grid-column: 1 / -1; }
  .tool .ha-card .ha-canvas { grid-column: 1; grid-row: 2 / span 2; }
  .tool .ha-card-opts, .tool .ha-card .ha-actions { grid-column: 2; }
  .tool .ha-card .ha-actions { display: grid; grid-template-columns: 1fr; }
}
@media (min-width: 1120px) {
  .tool[data-tool="how-far-apart-are-we"] { width: 1060px; margin-left: calc((100% - 1060px) / 2); }
}
/* Round 4 */
.tool .ha-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 14px; line-height: 20px; }
.tool .ha-links a { font-weight: 850; }
.tool .ha-rule { font-size: 13px; line-height: 18px; font-weight: 700; color: var(--ha-muted); }
@media (min-width: 900px) {
  .tool .ha-half { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 20px; align-items: start; }
  .tool .ha-half > .tool-title, .tool .ha-half > .ha-mid, .tool .ha-half > .ha-rule, .tool .ha-half > .ha-note, .tool .ha-half > .tool-note { grid-column: 1 / -1; }
  .tool .ha-halfmap-wrap { grid-column: 1; position: sticky; top: calc(var(--nav-h, 80px) + 16px); }
  .tool .ha-places { grid-column: 2; }
}
