/* Travel with friends landing page (travel-with-friends/). Builds on site.css and the app UI
   kit in landing.css. As on the group trip planner page, every illustration's finished state
   is the default, so the page reads the same without JavaScript or with Reduce Motion;
   assets/js/travel-with-friends.js only adds the movement. */

/* 1. Hero ----------------------------------------------------------------------------- */

.tf-hero-visual {
  padding-block: 12px 34px;
}

.tf-app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}

.tf-app-title {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.1;
}

.tf-app-top .av {
  width: 24px;
  height: 24px;
}

.tf-hero .ui-kicker {
  margin-top: 6px;
}

.tf-now-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 14px 2px 9px;
  color: var(--ink-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* The app's split view: one lane per friend down the left, each plan on its friend's lane,
   and the lanes meeting again at the next plan everyone shares. */
.tf-lanes {
  position: relative;
}

.tf-rail {
  position: absolute;
  inset: -6px auto 0 0;
  width: 52px;
}

.tf-rail i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(12px + var(--lane) * 8px);
  width: 3px;
  border-radius: 2px;
  background: var(--c);
}

.tf-lane-list {
  position: relative;
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tf-lane-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
}

.tf-lane-node {
  position: relative;
  height: 24px;
}

.tf-lane-node .av {
  position: absolute;
  top: 0;
  left: calc(13.5px + var(--lane) * 8px - 12px);
  width: 24px;
  height: 24px;
}

.tf-converge {
  display: block;
  width: 100%;
  height: 30px;
}

.tf-converge path {
  fill: none;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.tf-meet-card {
  display: grid;
  gap: 1px;
  padding: 12px 14px 13px;
  border-radius: 18px;
  background: var(--navy);
  color: var(--on-navy);
}

.tf-meet-card .ui-avatars {
  margin-bottom: 6px;
}

.tf-meet-card .av {
  outline-color: var(--navy);
}

.tf-meet-label {
  color: var(--aqua);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tf-meet-card strong {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
}

.tf-meet-meta {
  color: var(--on-navy-muted);
  font-size: 12px;
}

.tf-float-leave {
  top: 17%;
  right: -8px;
}

.tf-float-plan {
  bottom: 0;
  left: -8px;
  background: var(--confirmed);
}

.tf-float-plan .ui-avatars .av {
  outline-color: var(--confirmed);
}

.tf-float-plan p span {
  color: var(--confirmed-ink);
}

@media (max-width: 479px) {
  .tf-float-leave {
    display: none;
  }
}

@media (min-width: 960px) {
  .tf-float-leave {
    right: -5%;
  }

  .tf-float-plan {
    left: -4%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .tf-float-plan {
    animation-delay: 300ms, 2s;
  }
}

/* 2. The group chat ------------------------------------------------------------------- */

.tf-chat-stage {
  position: relative;
  display: grid;
  gap: 16px;
  align-items: center;
  max-width: 980px;
  margin-inline: auto;
}

.tf-chat-panel {
  position: relative;
  padding: 14px 14px 16px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.tf-chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 2px 12px;
  border-bottom: 1px solid var(--border);
}

.tf-chat-head p {
  display: grid;
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}

.tf-chat-head strong {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.tf-chat-head p span {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 12.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Navy on sunset is 4.8:1. */
.tf-unread {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--sunset);
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.tf-msgs {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.tf-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.tf-msg .av {
  width: 28px;
  height: 28px;
}

.tf-msg p {
  display: grid;
  max-width: 84%;
  padding: 7px 12px 8px;
  border-radius: 18px 18px 18px 6px;
  background: var(--tint-neutral);
  color: var(--ink);
  font-size: 0.9375rem;
  line-height: 1.3;
}

.tf-msg b {
  color: var(--ink-muted);
  font-size: 11.5px;
  font-weight: 700;
}

.tf-typing,
.tf-caught-up {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-left: 36px;
  color: var(--ink-muted);
  font-size: 0.8125rem;
}

.tf-dots {
  display: inline-flex;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 14px;
  background: var(--tint-neutral);
}

.tf-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8c98ab;
}

@media (prefers-reduced-motion: no-preference) {
  .tf-dots i {
    animation: tf-typing 1.2s ease-in-out infinite;
  }

  .tf-dots i:nth-child(2) {
    animation-delay: 0.15s;
  }

  .tf-dots i:nth-child(3) {
    animation-delay: 0.3s;
  }
}

@keyframes tf-typing {
  30% {
    transform: translateY(-3px);
    opacity: 0.6;
  }
}

/* Shown once the questions have moved into the trip (see animateChat). */
.tf-caught-up {
  display: none;
  color: var(--confirmed-ink);
  font-weight: 700;
}

.tf-caught-up svg {
  width: 18px;
  height: 18px;
}

.tf-chat-panel.is-caught-up .tf-caught-up {
  display: flex;
}

.tf-chat-panel.is-caught-up .tf-typing {
  display: none;
}

.tf-chat-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--navy);
  color: var(--on-navy);
  transform: rotate(90deg);
}

.tf-chat-arrow svg {
  width: 22px;
  height: 22px;
}

.tf-answers {
  padding: 16px;
}

.tf-answers-head,
.tf-merge-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.tf-answers-head .ui-tile {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.tf-answers-head p,
.tf-merge-head p {
  display: grid;
  line-height: 1.25;
}

.tf-answers-head strong,
.tf-merge-head strong {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.tf-answers-head p span,
.tf-merge-head p span {
  color: var(--ink-muted);
  font-size: 0.8125rem;
}

.tf-answer-list {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.tf-answer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 14px;
  background: var(--bg);
  transition: background-color 400ms ease;
}

.tf-answer .ui-text strong {
  font-size: 14px;
}

.tf-answer .ui-text span {
  font-size: 12.5px;
}

.tf-answer.is-lit {
  background: var(--confirmed);
}

.tf-chat-line,
.tf-days-line {
  max-width: 30ch;
  margin: clamp(32px, 4vw, 48px) auto 0;
  text-align: center;
}

@media (min-width: 860px) {
  .tf-chat-stage {
    grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
    gap: 20px;
  }

  .tf-chat-arrow {
    transform: none;
  }
}

/* 3. Everyone's bookings -------------------------------------------------------------- */

.tf-merge {
  max-width: 1000px;
  margin-inline: auto;
}

.tf-sources {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tf-source {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border-top: 4px solid var(--c);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.tf-source-who {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.25;
}

.tf-source-who .av {
  width: 30px;
  height: 30px;
}

.tf-source-who > span {
  display: grid;
  color: var(--ink-muted);
  font-size: 0.8125rem;
}

/* On phones the booking itself says where it came from. */
@media (max-width: 479px) {
  .tf-source-what {
    display: none;
  }
}

.tf-source-who strong {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}

.tf-doc {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink-muted);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.tf-doc strong {
  color: var(--ink);
  font-size: 0.875rem;
}

.tf-doc-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tf-doc-label svg {
  width: 14px;
  height: 14px;
}

.tf-doc-shot {
  border: 1.5px dashed #c3ccd8;
  background: var(--surface);
}

.tf-doc-code {
  display: grid;
  grid-template-columns: repeat(3, 7px);
  gap: 2px;
  margin-top: 6px;
}

.tf-doc-code i {
  width: 7px;
  height: 7px;
  background: var(--ink);
}

.tf-doc-code i:nth-child(3n + 2),
.tf-doc-code i:nth-child(4) {
  background: #c3ccd8;
}

.tf-merge-lanes {
  display: none;
}

.tf-merge-trip {
  width: min(100%, 560px);
  margin: 16px auto 0;
  padding: 16px;
  box-shadow: var(--shadow-hero);
}

.tf-merge-head {
  justify-content: space-between;
  margin-bottom: 12px;
}

.tf-merge-trip .ui-row {
  padding: 9px 12px;
  background: var(--bg);
  box-shadow: none;
}

.tf-merge-trip .ui-text strong {
  font-size: 14.5px;
}

.tf-merge-trip .ui-text span {
  font-size: 12.5px;
}

.tf-origins {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: clamp(32px, 4vw, 48px);
}

.tf-origins-label {
  color: var(--ink-muted);
  font-size: 0.9375rem;
  font-weight: 700;
}

.tf-origins .lp-tags {
  justify-content: center;
}

@media (min-width: 760px) {
  .tf-sources {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }

  /* Each friend's lane carries their booking down into the shared trip. */
  .tf-merge-lanes {
    display: block;
    width: 100%;
    height: 110px;
  }

  .tf-merge-lanes path {
    fill: none;
    stroke-linecap: round;
    stroke-dasharray: 1;
    vector-effect: non-scaling-stroke;
  }

  .tf-merge-lanes .casing {
    stroke: var(--bg);
    stroke-width: 10;
  }

  .tf-merge-lanes .lane {
    stroke-width: 5;
  }

  .tf-merge-trip {
    margin-top: -2px;
  }
}

/* 4. Gmail ---------------------------------------------------------------------------- */

.tf-pipeline {
  display: grid;
  gap: 20px;
}

.tf-pipe-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.tf-pipe {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tf-step {
  display: grid;
  align-content: start;
  gap: 10px;
}

.tf-step-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-size: 0.9375rem;
  font-weight: 700;
}

.tf-step-label span {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--on-navy);
  font-size: 13px;
  transition: background-color 250ms ease, color 250ms ease;
}

.tf-step.is-active .tf-step-label span {
  background: var(--aqua);
  color: var(--navy);
}

.tf-pipe-card {
  padding: 14px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: box-shadow 250ms ease;
}

.tf-step.is-active .tf-pipe-card {
  box-shadow: 0 0 0 2px var(--aqua), var(--shadow-card);
}

.tf-pipe-subject {
  margin-top: 10px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
}

.tf-pipe-snippet {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.tf-pipe-found {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  background: var(--navy);
  color: var(--on-navy);
  text-align: center;
}

.tf-found-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(32, 199, 207, 0.18);
  color: var(--aqua);
}

.tf-found-icon svg {
  width: 24px;
  height: 24px;
}

.tf-pipe-found p {
  display: grid;
  line-height: 1.3;
}

.tf-pipe-found strong {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.tf-pipe-found p span {
  color: var(--on-navy-muted);
  font-size: 0.8125rem;
}

.tf-review-q,
.tf-added-trip {
  margin-bottom: 10px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.tf-pipe-review .ui-row,
.tf-pipe-added .ui-row {
  background: var(--bg);
  box-shadow: none;
}

.tf-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
}

.tf-review-actions .gm-ignore {
  padding: 7px 8px;
}

.tf-added-row {
  outline: 2px solid var(--aqua);
}

.tf-added-check {
  flex: none;
  width: 22px;
  height: 22px;
  padding: 3px;
  border-radius: 50%;
  background: var(--aqua);
  color: var(--navy);
  stroke-width: 3;
}

.tf-gmail-foot {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 640px;
  margin: clamp(28px, 4vw, 44px) auto 0;
}

@media (min-width: 900px) {
  .tf-pipe {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }

  .tf-pipe-card {
    min-height: 148px;
  }

  /* A dotted line from each step to the next. */
  .tf-step:not(:last-child) .tf-step-label::after {
    content: "";
    flex: 1;
    height: 2px;
    margin-left: 4px;
    background: linear-gradient(90deg, #b9c3d1 50%, transparent 0) 0 0 / 8px 2px;
  }
}

/* 5. Split up, meet back up ----------------------------------------------------------- */

.tf-day {
  margin: 0;
}

.tf-day-name {
  margin-bottom: 18px;
  color: var(--aqua);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.tf-braid-stage {
  position: relative;
  width: min(100%, 400px);
  margin-inline: auto;
  aspect-ratio: 360 / 820;
}

.tf-braid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.tf-braid-wide {
  display: none;
}

.tf-braid .casing,
.tf-braid .lane {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.tf-braid .casing {
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 11;
}

.tf-braid .lane {
  stroke-width: 6;
}

.tf-stops {
  position: absolute;
  inset: 0;
}

/* --tx/--ty place a stop on the tall drawing, --x/--y on the wide one (in % of the viewBox). */
.tf-stop {
  position: absolute;
  left: calc(var(--tx) * 1%);
  top: calc(var(--ty) * 1%);
  display: grid;
  justify-items: center;
  gap: 6px;
  transform: translate(-50%, -16px);
}

.tf-stop-faces {
  display: flex;
}

.tf-stop-faces .av {
  width: 32px;
  height: 32px;
  border-width: 3px;
  outline-color: var(--navy);
}

.tf-stop-faces .av + .av {
  margin-left: -12px;
}

.tf-stop-all .tf-stop-faces .av {
  width: 28px;
  height: 28px;
}

.tf-stop-label {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.tf-stop-label b {
  margin-right: 3px;
  color: var(--blue);
}

/* The tall drawing's columns are narrow, so its labels are shorter, and labels are smaller
   until the wide drawing has room for them. */
.tf-long {
  display: none;
}

@media (max-width: 1099px) {
  .tf-stop-label {
    padding: 3px 8px;
    font-size: 12.5px;
  }
}

/* Navy on sunset is 4.8:1. */
.tf-meet-pill {
  display: grid;
  padding: 7px 14px 8px;
  border-radius: 16px;
  background: var(--sunset);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.tf-meet-pill b {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tf-ticks {
  display: none;
}

.tf-split-foot {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 720px;
  margin: clamp(36px, 5vw, 56px) auto 0;
  text-align: center;
}

.tf-split-foot .check-list {
  text-align: left;
}

@media (min-width: 960px) {
  .tf-braid-stage {
    width: 100%;
    aspect-ratio: 1160 / 400;
  }

  .tf-braid-wide {
    display: block;
  }

  .tf-braid-tall {
    display: none;
  }

  .tf-stop {
    left: calc(var(--x) * 1%);
    top: calc(var(--y) * 1%);
  }

  .tf-long {
    display: inline;
  }

  /* At the left edge, the first stop's label runs right from the lanes instead of centering. */
  .tf-stop-all {
    justify-items: start;
    transform: translate(-20px, -14px);
  }

  .tf-ticks {
    position: absolute;
    inset: auto 0 -30px;
    display: block;
    height: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .tf-ticks li {
    position: absolute;
    left: calc(var(--x) * 1%);
    color: var(--on-navy-muted);
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
    transform: translateX(-50%);
  }
}

/* 6. Everyone's own day --------------------------------------------------------------- */

.tf-days-stage {
  max-width: 1040px;
  margin-inline: auto;
}

.tf-days-shared {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 auto 18px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--navy);
  color: var(--on-navy);
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
}

.tf-day-cards {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tf-day-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-top: 5px solid var(--c);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.tf-day-who {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tf-day-who .av {
  width: 36px;
  height: 36px;
}

.tf-day-who span {
  display: grid;
  color: var(--ink-muted);
  font-size: 0.8125rem;
  line-height: 1.25;
}

.tf-day-who strong {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.tf-day-slot {
  display: grid;
  line-height: 1.3;
}

.tf-day-label {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tf-day-slot strong {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.tf-day-slot span:last-child {
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.tf-day-leave {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--tint-sunset);
}

.tf-day-leave span {
  width: 100%;
  color: var(--sunset-ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tf-day-leave strong {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}

.tf-day-leave em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-style: normal;
  font-weight: 600;
}

.tf-day-leave em svg {
  width: 15px;
  height: 15px;
}

@media (min-width: 820px) {
  .tf-day-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}

/* 7. Leave times ---------------------------------------------------------------------- */

.tf-leave-visual {
  width: min(100%, 520px);
  margin-inline: auto;
}

.tf-map {
  padding: 16px;
}

.tf-map-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tf-map-head p {
  display: grid;
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}

.tf-map-head strong {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.tf-map-head p span {
  color: var(--ink-muted);
  font-size: 0.8125rem;
}

.tf-clock {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--navy);
  color: var(--on-navy);
  font-size: 0.875rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* A schematic map, like the app's: a grid, not real streets. */
.tf-map-canvas {
  position: relative;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 400 / 250;
  background-color: #eef2f7;
  background-image: linear-gradient(#dfe5ee 1px, transparent 1px), linear-gradient(90deg, #dfe5ee 1px, transparent 1px);
  background-size: 10% 16%;
}

.tf-map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tf-map-river {
  fill: none;
  stroke: #cbe4f6;
  stroke-width: 14;
  stroke-linecap: round;
}

.tf-route {
  fill: none;
  stroke-width: 3.5;
  stroke-dasharray: 7 7;
  stroke-linecap: round;
}

.tf-origin circle {
  fill: var(--surface);
  stroke: #8c98ab;
  stroke-width: 3;
}

.tf-dot {
  stroke: var(--surface);
  stroke-width: 3;
}

.tf-map-pin circle {
  fill: var(--sunset);
  stroke: var(--surface);
  stroke-width: 4;
}

.tf-map-pin path {
  fill: none;
  stroke: var(--navy);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tf-place {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 11px));
}

/* Left of the pin, clear of the routes coming in from the east. */
.tf-place-main {
  background: var(--navy);
  color: var(--on-navy);
  transform: translate(calc(-100% - 24px), -50%);
}

.tf-map-tag {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: #6f7b8f;
  font-size: 11px;
}

.tf-leave-list {
  display: grid;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.tf-leave-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--bg);
  transition: background-color 300ms ease;
}

.tf-leave-list li.is-going {
  background: var(--confirmed);
}

.tf-leave-time {
  flex: none;
  width: 42px;
  color: var(--navy);
  font-size: 0.9375rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.tf-leave-list .av {
  width: 28px;
  height: 28px;
}

.tf-leave-list p {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.tf-leave-list strong {
  color: var(--ink);
  font-size: 0.875rem;
}

.tf-leave-list p span {
  color: var(--ink-muted);
  font-size: 0.8125rem;
}

/* 8. Lock Screen ---------------------------------------------------------------------- */

.tf-la {
  grid-template-areas: "head" "state";
  gap: 10px;
}

.tf-la-state {
  grid-area: state;
  display: grid;
  align-content: start;
  gap: 8px;
}

.tf-la-go {
  visibility: hidden;
}

.tf-la-row {
  display: grid;
  line-height: 1.25;
}

.tf-la-row strong {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
}

.tf-la-row > span:last-child {
  color: var(--ink-muted);
  font-size: 12.5px;
}

.tf-la-leave {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--tint-sunset);
  color: var(--sunset-ink);
  font-size: 0.8125rem;
  font-weight: 700;
}

.tf-la-leave strong {
  color: var(--navy);
}

.tf-la-leave svg {
  width: 15px;
  height: 15px;
}

/* Navy on sunset is 4.8:1. */
.tf-la-leave.is-now {
  background: var(--sunset);
  color: var(--navy);
}

/* 9. Expenses ------------------------------------------------------------------------- */

.tf-money-visual {
  width: min(100%, 360px);
  margin-inline: auto;
}

.tf-money-title {
  margin-top: 2px;
  font-size: 24px;
}

.tf-scan {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--surface);
}

.tf-scan-thumb {
  position: relative;
  display: grid;
  align-content: start;
  gap: 4px;
  flex: none;
  width: 38px;
  height: 50px;
  padding: 7px 6px;
  overflow: hidden;
  border-radius: 6px;
  background: #fffdf8;
  box-shadow: 0 1px 3px rgba(6, 43, 99, 0.2);
}

.tf-scan-thumb i {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: #c9d1dc;
}

.tf-scan-thumb i:nth-child(odd) {
  width: 70%;
}

.tf-scan-line {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--aqua);
  box-shadow: 0 0 8px var(--aqua);
  opacity: 0;
}

.tf-scan p {
  display: grid;
  flex: 1;
  line-height: 1.25;
}

.tf-scan strong {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.tf-scan p span {
  color: var(--ink-muted);
  font-size: 12px;
}

.tf-scan-check {
  flex: none;
  width: 22px;
  height: 22px;
  padding: 3px;
  border-radius: 50%;
  background: var(--confirmed);
  color: var(--confirmed-ink);
  stroke-width: 3;
}

.tf-money-phone .ui-label span {
  margin-left: 4px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.tf-went {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.tf-went li {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.tf-went-face {
  position: relative;
}

.tf-went-face .av {
  width: 36px;
  height: 36px;
}

.tf-went-face svg {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 18px;
  height: 18px;
  padding: 2px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: #0b8a7e;
  color: var(--on-navy);
  stroke-width: 3.2;
  box-sizing: content-box;
}

.tf-methods {
  display: flex;
  gap: 6px;
}

.tf-methods button {
  flex: 1;
  min-height: 40px;
  padding: 0 6px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(6, 43, 99, 0.06);
  color: var(--navy);
  font: 700 12.5px/1.2 var(--font-body);
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}

.tf-methods button[aria-pressed="true"] {
  background: var(--navy);
  color: var(--on-navy);
}

.tf-methods button:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 2px;
}

.tf-shares {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.tf-shares li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 14px;
  background: var(--surface);
  font-size: 13.5px;
}

.tf-shares span {
  flex: 1;
  color: var(--ink);
  font-weight: 700;
}

.tf-shares em {
  margin-left: 6px;
  color: var(--ink-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.tf-shares strong {
  color: var(--sunset-ink);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.tf-paid {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--ink-muted);
  font-size: 12px;
}

.tf-paid svg {
  flex: none;
  width: 14px;
  height: 14px;
}

/* 10. Plans change -------------------------------------------------------------------- */

.tf-change-visual {
  width: min(100%, 480px);
  margin-inline: auto;
}

.tf-change-card {
  padding: 18px;
}

.tf-change-card .ui-kicker {
  margin-top: 0;
}

.tf-change-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.tf-change-list .ui-row {
  background: var(--bg);
  box-shadow: none;
}

.tf-change-train {
  display: grid;
  gap: 6px;
}

.tf-change-train .ui-text span s {
  color: var(--ink-muted);
}

.tf-change-train .ui-text span b {
  color: var(--sunset-ink);
}

.badge-review {
  background: var(--tentative);
  color: var(--tentative-ink);
}

.tf-affects {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 62px;
  color: var(--tentative-ink);
  font-size: 12px;
  font-weight: 700;
}

.tf-affects svg {
  width: 15px;
  height: 15px;
}

.tf-change-dinner {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  background: var(--tentative);
}

.tf-change-dinner .ui-row {
  background: var(--surface);
}

.tf-change-dinner .tf-review-actions {
  margin-top: 0;
  padding-left: 4px;
}

.tf-review-flag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 4px;
  color: var(--tentative-ink);
  font-size: 12px;
  font-weight: 700;
}

.tf-flag-changed {
  color: var(--sunset-ink);
}

.tf-suggest {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--navy);
  color: var(--navy);
}

.tf-change-note {
  padding-left: 4px;
  color: var(--tentative-ink);
  font-size: 12.5px;
}

.tf-change-calm {
  opacity: 0.72;
}

/* 11. The person everyone asks -------------------------------------------------------- */

.tf-manager {
  background: var(--tint-sunset);
}

.tf-asks {
  display: grid;
  justify-items: center;
  gap: 20px;
  max-width: 920px;
  margin-inline: auto;
}

.tf-asks-center {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.tf-asks-face {
  width: 104px;
  height: 104px;
  border-width: 4px;
  outline: 4px solid var(--tint-sunset);
}

.tf-asks-name {
  display: grid;
  line-height: 1.2;
}

.tf-asks-name strong {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}

.tf-asks-name span {
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.tf-asks-status {
  display: grid;
  justify-items: center;
}

.tf-asks-status > span {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 800;
  white-space: nowrap;
}

/* The finished state is off duty; the animation starts from the busy one. */
.tf-status-busy {
  background: var(--sunset);
  color: var(--navy);
  visibility: hidden;
}

.tf-status-free {
  background: var(--confirmed);
  color: var(--confirmed-ink);
}

.tf-status-free svg {
  width: 16px;
  height: 16px;
}

.tf-ask-list {
  display: grid;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tf-ask {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 20px 20px 20px 6px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.tf-ask .av {
  width: 32px;
  height: 32px;
}

.tf-ask p {
  display: grid;
  justify-items: start;
  gap: 5px;
  line-height: 1.3;
}

.tf-ask strong {
  color: var(--ink);
  font-size: 1.0625rem;
}

.tf-ask-answer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--confirmed);
  color: var(--confirmed-ink);
  font-size: 0.8125rem;
  font-weight: 700;
}

.tf-ask-answer svg {
  flex: none;
  width: 14px;
  height: 14px;
}

.tf-manager-copy {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: clamp(32px, 4vw, 48px);
  text-align: center;
}

.tf-manager-statement {
  max-width: 24ch;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.1rem + 1.1vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
}

.tf-manager-copy .btn {
  margin-top: 6px;
}

@media (min-width: 640px) {
  .tf-ask-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tf-ask:last-child {
    grid-column: 1 / -1;
    justify-self: center;
  }
}

/* On wide screens the questions gather around Sarah. */
@media (min-width: 900px) {
  .tf-asks {
    position: relative;
    display: block;
    height: 440px;
  }

  .tf-asks-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -54%);
  }

  .tf-ask-list {
    position: absolute;
    inset: 0;
    display: block;
  }

  .tf-ask {
    position: absolute;
    width: 280px;
  }

  .tf-ask:nth-child(1) {
    top: 2%;
    left: 3%;
  }

  .tf-ask:nth-child(2) {
    top: 2%;
    right: 3%;
  }

  .tf-ask:nth-child(3) {
    top: 40%;
    left: 0;
  }

  .tf-ask:nth-child(4) {
    top: 40%;
    right: 0;
  }

  .tf-ask:nth-child(5) {
    bottom: 0;
    left: calc(50% - 140px);
  }
}

/* 12. How it works -------------------------------------------------------------------- */

.tf-how-braid {
  display: none;
}

.tf-how-steps {
  display: grid;
  gap: 16px;
  margin: clamp(40px, 5vw, 64px) 0 0;
  padding: 0;
  list-style: none;
}

.tf-how-step {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.tf-how-step h3 {
  color: var(--navy);
  font-size: 1.25rem;
}

.tf-how-step > p {
  color: var(--ink-muted);
}

.tf-how-art {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  height: 150px;
  margin-bottom: 4px;
  padding: 14px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--bg);
}

.tf-how-trip {
  padding: 12px 16px;
}

.tf-how-trip .ui-kicker {
  margin-top: 0;
}

.tf-how-trip .ui-title {
  font-size: 20px;
}

.tf-how-route {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 12.5px;
}

.tf-how-invite {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}

.tf-how-invite .av,
.tf-how-joined .av {
  width: 30px;
  height: 30px;
}

.tf-how-invite p {
  display: grid;
  line-height: 1.25;
}

.tf-how-invite strong {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.tf-how-invite p span {
  color: var(--ink-muted);
  font-size: 12px;
}

.tf-how-sources {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tf-how-sources li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
}

.tf-how-sources svg {
  width: 13px;
  height: 13px;
}

.tf-how-day {
  display: grid;
  gap: 6px;
  width: min(100%, 230px);
}

.tf-how-day p {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
}

.tf-how-day span {
  width: 40px;
  color: var(--blue);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tf-how-day .tf-how-leave {
  background: var(--tint-sunset);
}

.tf-how-day .tf-how-leave span {
  color: var(--sunset-ink);
}

@media (min-width: 900px) {
  /* Sarah starts the trip, friends' lanes join, plans ride along, and the trip splits and
     comes back together: the four steps as one braid. */
  .tf-how-braid {
    display: block;
    width: 100%;
    height: auto;
    margin-top: clamp(36px, 4vw, 52px);
  }

  .tf-how-braid path {
    fill: none;
    stroke-linecap: round;
  }

  .tf-how-braid .lane {
    stroke-width: 5;
  }

  .tf-how-joins circle {
    fill: var(--surface);
    stroke-width: 4;
  }

  .tf-how-plans circle {
    fill: var(--navy);
    stroke: var(--surface);
    stroke-width: 2;
  }

  .tf-how-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 14px;
  }
}

/* 13. More exploring ------------------------------------------------------------------ */

.tf-moment-grid {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tf-moment {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 170px;
  padding: 20px;
  overflow: hidden;
  border-radius: var(--radius-hero);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.tf-moment-caption {
  color: var(--navy);
  font-size: 1.25rem;
}

.tf-moment-note {
  color: var(--ink-muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.tf-moment .ui-row {
  box-shadow: none;
}

.tf-moment-photo {
  align-content: end;
  min-height: 380px;
  padding: 20px;
  background: var(--navy);
}

.tf-moment-photo > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* A scrim at the foot of the photo keeps its caption readable. */
.tf-moment-photo::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, rgba(4, 23, 51, 0.72));
}

.tf-moment-photo .tf-moment-caption {
  position: relative;
  z-index: 1;
  color: var(--on-navy);
  font-size: 1.5rem;
}

.tf-moment-chip {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-hero);
}

.tf-moment-chip > span:last-child {
  display: grid;
  line-height: 1.25;
}

.tf-moment-chip strong {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.tf-moment-chip > span:last-child {
  color: var(--ink-muted);
  font-size: 12.5px;
}

.tf-moment-chip > svg {
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 12px;
  background: var(--tint-sunset);
  color: var(--sunset-ink);
}

.tf-moment-chip-top {
  top: 16px;
  left: 16px;
}

.tf-moment-chip-bottom {
  right: 16px;
  bottom: 72px;
}

.tf-moment-split {
  background: var(--navy);
}

.tf-moment-split .tf-moment-caption {
  color: var(--on-navy);
}

.tf-moment-split .tf-moment-note {
  color: var(--on-navy-muted);
}

.tf-moment-lanes {
  width: 100%;
  max-width: 280px;
  height: auto;
}

.tf-moment-lanes path {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
}

.tf-moment-train {
  background: var(--confirmed);
}

.tf-moment-dinner {
  background: var(--tint-sunset);
}

.tf-moment-dinner .av {
  width: 40px;
  height: 40px;
  outline-color: var(--tint-sunset);
}

.tf-moment-dinner .av + .av {
  margin-left: -10px;
}

.tf-moment-piazza {
  background: #fdeef4;
}

@media (min-width: 760px) {
  .tf-moment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tf-moment-photo {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1000px) {
  .tf-moment-grid {
    grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr));
  }

  .tf-moment-photo {
    grid-row: 1 / span 2;
    grid-column: 1;
  }
}

/* 15. Final call to action ------------------------------------------------------------ */

.tf-final-braid {
  display: block;
  width: 200px;
  height: auto;
  margin: 0 auto -4px;
}

.tf-final-braid path {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
}

/* Increase Contrast: solid borders instead of soft shadows (DESIGN.md §8). */
@media (prefers-contrast: more) {
  .tf-chat-panel,
  .tf-source,
  .tf-pipe-card,
  .tf-day-card,
  .tf-ask,
  .tf-how-step,
  .tf-moment,
  .tf-scan,
  .tf-shares li,
  .tf-methods button {
    border: 1.5px solid var(--ink);
    box-shadow: none;
  }
}
