/* Widgets for Venus Chat (see widgets.js): cards a reply can hold, the pane shown while one is being
   written, and the full screen step by step view. Monochrome like the rest of the app, on its tokens.
   A card is 14px round with 18px of padding; the controls inside it are pills or 10px. */

.vw {
  width: 100%; min-width: 0; margin: 0; padding: 18px; border-radius: var(--r-3);
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink);
  font-size: .9375rem; line-height: 1.5; overflow-wrap: anywhere;
}
.body > .vw, .body > .vcraft { margin-top: 1.1em; }
.body > .vw + *, .body > .vcraft + * { margin-top: 1.1em; }
/* lists inside a card are laid out by the card, not by the reply's own list rules */
.body .vw :is(ul, ol) { padding-left: 0; }
.body .vw li { padding-left: 0; }
.body .vw li + li { margin-top: 0; }
.body .vw .vw__table ul { padding-left: 1.1em; }
.vw .i { display: block; flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.vw__head { display: grid; gap: 6px; }
.vw__kicker { font-size: .8125rem; font-weight: 400; color: var(--ink-3); }
.vw__title { font-size: 1.3125rem; line-height: 1.2; letter-spacing: -.02em; font-weight: 600; text-wrap: balance; }
.vw__blurb { color: var(--ink-2); text-wrap: pretty; }
.vw__sub { display: flex; align-items: baseline; gap: 10px; margin: 20px 0 8px; font-size: 1rem; font-weight: 600; letter-spacing: -.01em; }
.vw__sub span { font-size: .8125rem; font-weight: 400; color: var(--ink-3); }
.vw__foot { margin-top: 14px; font-size: .8125rem; color: var(--ink-3); text-wrap: pretty; }
.vw__note { display: block; font-size: .875rem; color: var(--ink-3); }
.vw__grow { flex: 1; }
.vw__where { font-size: .8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.vw__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.vw__bar--mid { justify-content: center; gap: 10px; }
.vw__meta { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; font-size: .875rem; color: var(--ink-2); }
.vw__meta .i { width: 16px; height: 16px; color: var(--ink-3); }
.vw__round {
  display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  background: var(--field); color: var(--ink-2); cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform 320ms var(--spring);
}
.vw__round:hover { background: var(--active); color: var(--ink); }
.vw__round:active { transform: scale(.9); }
.vw__round[data-state="done"] { background: var(--inverse); color: var(--inverse-ink); }
.vw__btn, .vw__go {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px;
  font-family: inherit; font-size: .875rem; font-weight: 400; cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease), transform 320ms var(--spring);
}
.vw__btn { background: var(--field); color: var(--ink); }
.vw__btn:hover { background: var(--active); }
.vw__btn .i { width: 16px; height: 16px; }
.vw__go { background: var(--inverse); color: var(--inverse-ink); }
.vw__go:hover { opacity: .86; }
.vw__go:active, .vw__btn:active { transform: scale(.96); }
.vw__serve { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; }
.vw__count { min-width: 1.8em; text-align: center; font-weight: 400; font-variant-numeric: tabular-nums; }
.vw__unit { margin-left: 4px; font-size: .875rem; color: var(--ink-3); }

.vw__ings { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 4px 24px; }
.vw__ings li { padding: 3px 0; color: var(--ink-2); }
.vw__ings b { font-weight: 400; color: var(--ink); font-variant-numeric: tabular-nums; }
.vw__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.vw__steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; }
.vw__steps p { color: var(--ink-2); padding-top: 2px; }
.vw__steps b { font-weight: 400; color: var(--ink); }
.vw__n {
  display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--field); color: var(--ink-2); font-family: var(--font-mono); font-size: .75rem; line-height: 1;
}
.vw__mins { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: .8125rem; color: var(--ink-3); white-space: nowrap; vertical-align: baseline; }
.vw__mins .i { width: 14px; height: 14px; }

/* itinerary: a day is a line of stops, each with its time on the left */
.vw__day + .vw__day { margin-top: 6px; }
.vw__line { list-style: none; margin: 0; padding: 0; display: grid; }
.vw__line li { position: relative; display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: 0 18px; padding: 0 0 16px; }
.vw__line li > div { position: relative; padding-left: 18px; border-left: 1.5px solid var(--line); margin-bottom: -16px; padding-bottom: 16px; }
.vw__line li:last-child > div { border-left-color: transparent; }
.vw__line li > div::before { content: ""; position: absolute; left: -5.5px; top: .45em; width: 9px; height: 9px; border-radius: 50%; background: var(--bg-2); box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.vw__time { font-family: var(--font-mono); font-size: .8125rem; color: var(--ink-3); padding-top: 2px; text-align: right; }
.vw__what { font-weight: 400; }
.vw__place { display: flex; align-items: center; gap: 5px; margin-top: 2px; font-size: .8125rem; color: var(--ink-3); }
.vw__place .i { width: 14px; height: 14px; }
.vw__line .vw__note { margin-top: 3px; }

/* map: tiles in greys, numbered pins, and the same numbers in the list under it */
.vw__map { height: clamp(240px, 42vh, 380px); margin-top: 14px; border-radius: var(--r-2); overflow: hidden; background: var(--bg-3); color: var(--ink); z-index: 0; }
.vw__map.is-off { display: grid; place-items: center; height: 96px; font-size: .875rem; color: var(--ink-3); }
.vw__map .leaflet-tile-pane { filter: grayscale(1) contrast(1.06); }
:root[data-theme="dark"] .vw__map .leaflet-tile-pane { filter: grayscale(1) invert(1) contrast(.9) brightness(.9); }
.vw__map .leaflet-container, .vw__map.leaflet-container { font-family: var(--font-text); background: var(--bg-3); }
.vw__mark span {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--inverse); color: var(--inverse-ink); box-shadow: 0 0 0 2px var(--bg);
  font-family: var(--font-mono); font-size: .75rem; line-height: 1;
}
.vw__route { stroke: var(--ink); }
.vw__map .leaflet-popup-content-wrapper, .vw__map .leaflet-popup-tip { background: var(--menu-bg); color: var(--menu-ink); box-shadow: var(--menu-shadow); }
.vw__map .leaflet-popup-content-wrapper { border-radius: var(--r-2); }
.vw__map .leaflet-popup-content { margin: 10px 14px; font-size: .875rem; line-height: 1.45; }
.vw__map .leaflet-bar a { background: var(--menu-bg); color: var(--menu-ink); border-color: var(--line); }
.vw__map .leaflet-control-attribution { background: var(--glass); color: var(--ink-3); font-size: .6875rem; }
.vw__map .leaflet-control-attribution a { color: var(--ink-2); }
.vw__pins { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 4px; }
.vw__pins button {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: var(--r-2);
  background: transparent; color: var(--ink); cursor: pointer; text-align: left; font-family: inherit; font-size: .9375rem;
  transition: background var(--t-fast) var(--ease);
}
.vw__pins button:hover { background: var(--hover); }
.vw__pins b { display: block; font-weight: 400; }

/* quiz */
.vw__stage { display: grid; gap: 12px; margin-top: 12px; }
.vw__q { font-size: 1.125rem; line-height: 1.4; font-weight: 400; letter-spacing: -.01em; text-wrap: pretty; }
.vw__opts { display: grid; gap: 6px; }
.vw__opt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 8px 14px 8px 10px;
  border: 0; border-radius: var(--r-2); background: var(--field); color: var(--ink); cursor: pointer; text-align: left;
  font-family: inherit; font-size: .9375rem;
  transition: background var(--t-fast) var(--ease), transform 360ms var(--spring), box-shadow var(--t-fast) var(--ease);
}
.vw__opt:hover:not(:disabled) { background: var(--active); transform: translate(3px, -1px); }
.vw__opt:disabled { cursor: default; color: var(--ink-3); }
.vw__opt[data-mark="right"] { background: var(--inverse); color: var(--inverse-ink); }
.vw__opt[data-mark="right"] .vw__n { background: color-mix(in srgb, var(--inverse-ink) 18%, transparent); color: var(--inverse-ink); }
.vw__opt[data-mark="wrong"] { box-shadow: inset 0 0 0 1.5px var(--rule-strong); color: var(--ink); text-decoration: line-through; text-decoration-color: var(--ink-3); }
.vw__after { display: grid; gap: 12px; justify-items: start; animation: arrive-venus 520ms var(--spring-soft) both; }
.vw__verdict { color: var(--ink-2); text-wrap: pretty; }
.vw__score { font-size: 3rem; line-height: 1; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.vw__score span { font-size: 1.125rem; font-weight: 400; letter-spacing: 0; color: var(--ink-3); }

/* flashcards: one card that turns over in depth */
.vw__deck { margin-top: 14px; perspective: 1400px; }
.vw__card {
  position: relative; display: block; width: 100%; min-height: 220px; padding: 0; border: 0; background: transparent;
  color: var(--ink); cursor: pointer; font-family: inherit; transform-style: preserve-3d;
  transition: transform 720ms var(--spring-soft);
  /* backwards, not both: a fill that lasts past the end would hold transform: none and stop the flip */
  animation: deal 560ms var(--spring-soft) backwards;
}
.vw__deck[data-dir="-1"] .vw__card { animation-name: deal-back; }
.vw__card[aria-pressed="true"] { transform: rotateY(180deg); }
.vw__face {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; border-radius: var(--r-3);
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px -28px rgba(0, 0, 0, .5);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  font-size: 1.25rem; line-height: 1.4; font-weight: 400; letter-spacing: -.01em; text-align: center; text-wrap: balance;
}
.vw__face--back { transform: rotateY(180deg); background: var(--inverse); color: var(--inverse-ink); font-size: 1.0625rem; font-weight: 400; }
@keyframes deal { from { opacity: 0; transform: translate(46px, 14px) rotate(4deg) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes deal-back { from { opacity: 0; transform: translate(-46px, 14px) rotate(-4deg) scale(.96); } to { opacity: 1; transform: none; } }

/* comparison */
.vw__scroll { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent; }
.vw--compare .vw__scroll { margin-top: 14px; }
.vw__table { width: 100%; min-width: calc(7rem + var(--cols) * 11rem); border-collapse: separate; border-spacing: 0; font-size: .9375rem; line-height: 1.45; }
.vw__table th, .vw__table td { padding: 10px 12px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); color: var(--ink-2); }
.vw__table thead th { border-top: 0; vertical-align: bottom; color: var(--ink); }
.vw__table thead b { display: block; font-size: 1rem; font-weight: 600; letter-spacing: -.01em; }
.vw__table thead span { display: block; font-size: .875rem; font-weight: 400; color: var(--ink-3); }
.vw__table th[scope="row"] { width: 7rem; padding-left: 0; font-size: .8125rem; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.vw__table ul { margin: 0; padding-left: 1.1em; }
.vw__table .is-pick { background: var(--wash-strong); color: var(--ink); }
.vw__table thead .is-pick { border-radius: var(--r-2) var(--r-2) 0 0; }
.vw__table tbody tr:last-child .is-pick { border-radius: 0 0 var(--r-2) var(--r-2); }
.vw__tag { display: inline-block !important; margin-bottom: 6px; padding: 2px 9px; border-radius: 999px; background: var(--inverse); color: var(--inverse-ink) !important; font-size: .6875rem !important; font-weight: 400 !important; }

/* weather */
.vw__now { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.vw__temp { margin: 2px 0; font-size: 3.5rem; line-height: 1; font-weight: 600; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.vw__temp span { margin-left: 2px; font-size: 1.125rem; font-weight: 400; letter-spacing: 0; color: var(--ink-3); vertical-align: top; }
.vw__sky .i { width: 64px; height: 64px; stroke-width: 1.1; color: var(--ink-2); }
.vw__facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 14px 0 0; }
.vw__facts dt { font-size: .75rem; color: var(--ink-3); }
.vw__facts dd { margin: 0; font-weight: 400; font-variant-numeric: tabular-nums; }
.vw__days { list-style: none; margin: 16px 0 0; padding: 0; display: grid; }
.vw__days li { display: grid; grid-template-columns: 5.5rem auto minmax(0, 1fr) 2.6rem 2.6rem; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.vw__days .i { color: var(--ink-2); }
.vw__dayname { font-weight: 400; }
.vw__cond { color: var(--ink-3); font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vw__hi, .vw__lo { text-align: right; font-variant-numeric: tabular-nums; }
.vw__lo { color: var(--ink-3); }

/* translation and draft */
.vw__src { margin-top: 6px; color: var(--ink-3); }
.vw__big { margin-top: 8px; font-size: 1.5rem; line-height: 1.35; font-weight: 400; letter-spacing: -.01em; text-wrap: pretty; }
.vw__reading { margin-top: 4px; color: var(--ink-2); }
.vw__field { display: flex; gap: 12px; margin-top: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.vw__field span { flex: none; width: 4.2rem; font-size: .8125rem; color: var(--ink-3); padding-top: 1px; }
.vw__body {
  display: block; width: 100%; margin: 12px 0 0; padding: 12px 14px; border: 0; border-radius: var(--r-2); resize: vertical;
  background: var(--field-bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
  font: inherit; font-size: 1rem; line-height: 1.55; outline: none;
}
.vw__body:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }

/* flowchart and inline drawings */
.vw--flow, .vw--svg { background: transparent; box-shadow: none; padding: 4px 0; }
.vw--flow { container-type: inline-size; }
.vw__flowhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; margin-bottom: 10px; }
.vw__flowhead .vw__title { font-size: 1.0625rem; }
/* a chart always fits the column it is in. One that would be too small to read in a phone's column has a
   narrow layout of its own that takes over there, and the button beside its name puts it on the whole screen */
.vf { display: block; width: min(100%, var(--w)); height: auto; margin: 0 auto; color: var(--ink-2); font-family: var(--font-text); }
.vf--narrow { display: none; }
@container (max-width: 560px) {
  .vw--twin .vf--wide { display: none; }
  .vw--twin .vf--narrow { display: block; }
}
.vf__line { fill: none; stroke: currentColor; stroke-width: 1.4; }
.vf__head { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.vf__line--dashed { stroke-dasharray: 5 5; }
.vf__line--heavy { stroke-width: 2.6; color: var(--ink); }
.vf__head--heavy { stroke-width: 2.2; color: var(--ink); }
.vf__tag rect { fill: var(--bg); stroke: var(--line-strong); stroke-width: 1; }
.vf__label { fill: var(--ink-2); font-size: 12.5px; font-weight: 400; }
.vf__node rect { fill: var(--bg); stroke: var(--line-strong); stroke-width: 1.2; }
.vf__text { fill: var(--ink); font-size: 15px; font-weight: 400; letter-spacing: -.01em; }
.vf__sub { fill: var(--ink-3); font-size: 13px; }
.vf--narrow .vf__text { font-size: 14px; }
.vf--narrow .vf__sub { font-size: 12.5px; }
.vf--narrow .vf__label { font-size: 12px; }
.vf__node--decision rect { fill: var(--inverse); stroke: var(--inverse); }
.vf__node--decision .vf__text { fill: var(--inverse-ink); }
.vf__node--decision .vf__sub { fill: var(--inverse-ink); opacity: .7; }
.vf__node--good rect { fill: var(--bg-3); stroke: var(--ink-3); }
.vf__node--bad rect { stroke-dasharray: 5 4; stroke: var(--ink-3); }
.vf__node--start rect, .vf__node--end rect { fill: var(--bg-2); }
.vw--svg { display: grid; justify-items: center; }
.vw--svg > svg { display: block; width: min(100%, var(--w, 640px)); height: auto; max-height: 80vh; color: var(--ink); }

/* ------------------------------------------------------------------ crafting: where a widget is being written */
.vcraft {
  position: relative; display: grid; place-items: end start; width: 100%; height: 168px; padding: 16px 18px; overflow: hidden;
  border-radius: var(--r-3); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
}
.vcraft__text { position: relative; font-family: var(--font-mono); font-size: .8125rem; color: var(--ink-3); }
.vcraft__bubbles { position: absolute; inset: 0; }
.vcraft__bubbles i {
  position: absolute; left: calc(6% + var(--i) * 10.6%); bottom: -36px;
  width: var(--d, 20px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, var(--bg-3), var(--bg-2) 70%);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  animation: bubble var(--t, 5.2s) cubic-bezier(.3, .1, .3, 1) calc(var(--i) * -.83s) infinite;
}
.vcraft__bubbles i:nth-child(3n) { --d: 34px; --t: 6.3s; }
.vcraft__bubbles i:nth-child(3n + 1) { --d: 14px; --t: 4.3s; }
.vcraft__bubbles i:nth-child(4n + 2) { --d: 26px; --t: 5.6s; }
@media (prefers-reduced-motion: reduce) {
  .vcraft__bubbles i { bottom: calc(22% + var(--i) * 6%); }
}
@keyframes bubble {
  0% { transform: translate(0, 0) scale(.6); opacity: 0; }
  12% { opacity: .95; }
  35% { transform: translate(14px, -72px) scale(.85); }
  68% { transform: translate(-10px, -142px) scale(1); opacity: .8; }
  100% { transform: translate(8px, -214px) scale(1.12); opacity: 0; }
}

/* ------------------------------------------------------------------ the full screen step by step view */
.vstage {
  width: 100vw; height: var(--app-h, 100dvh); max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--bg); color: var(--ink); overflow: hidden;
}
.vstage[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: fade 320ms var(--ease); }
.vstage::backdrop { background: var(--bg); }
.vstage .i { display: block; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.vstage__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px 0 30px; }
.vstage__name { font-size: 1.0625rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vstage__close, .vstage__arrow {
  display: grid; place-items: center; flex: none; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink); cursor: pointer;
  transition: background var(--t-fast) var(--ease), transform 320ms var(--spring);
}
.vstage__close:hover, .vstage__arrow:hover { background: var(--hover); }
.vstage__arrow:active { transform: scale(.88); }
.vstage > .vstage__close { position: absolute; top: 20px; right: 24px; z-index: 1; }
.vstage__intro, .vstage__step { grid-row: 2; align-self: center; justify-self: center; width: min(100% - 48px, 46rem); display: grid; gap: 18px; }
.vstage__intro { grid-row: 1 / -1; justify-items: start; }
.vstage__step { justify-items: center; text-align: center; }
.vstage h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.vstage__step h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); }
.vstage p { font-size: clamp(1.125rem, 1rem + .6vw, 1.5rem); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.vstage__step p { color: var(--ink); }
.vstage .vstage__count { font-size: 1rem; color: var(--ink-3); }
.vstage__go { min-height: 48px; padding: 0 22px; border-radius: var(--r-3); font-size: 1.0625rem; margin-top: 8px; }
.vstage__timer {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 6px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--field); color: var(--ink); cursor: pointer; font-family: inherit; font-size: 1rem; font-variant-numeric: tabular-nums;
}
.vstage__timer .i { width: 20px; height: 20px; }
.vstage__timer:hover { background: var(--active); }

.vtimers { position: fixed; left: max(20px, env(safe-area-inset-left)); top: max(20px, env(safe-area-inset-top)); z-index: 60; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; pointer-events: none; }
.vstage > .vtimers { top: 76px; }
.vtimers:empty { display: none; }
.vtimer {
  position: relative; display: block; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 28px; overflow: hidden;
  background: #000; color: #fff; font-family: inherit; cursor: pointer; pointer-events: auto; box-shadow: 0 8px 24px rgb(0 0 0 / .22);
  transition: width 560ms cubic-bezier(.22, 1, .36, 1), border-radius 560ms cubic-bezier(.22, 1, .36, 1), box-shadow 400ms ease;
  animation: vtimer-in 520ms var(--spring-soft) both;
}
.vtimer:focus-visible { outline: 2px solid #f78b2e; outline-offset: 3px; }
.vtimer__dial {
  position: absolute; inset: 0; border-radius: 50%; transition: opacity 320ms ease, transform 560ms cubic-bezier(.22, 1, .36, 1);
  background: conic-gradient(#f78b2e var(--deg, 0deg), rgb(247 139 46 / .2) 0);
}
.vtimer__dial::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #000; }
.vtimer__time { position: absolute; inset: 0; display: grid; place-items: center; font-size: .8125rem; font-weight: 400; font-variant-numeric: tabular-nums; }
.vtimer__done {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0 18px 0 22px;
  opacity: 0; transform: translateX(-6px); transition: opacity 360ms ease 180ms, transform 560ms cubic-bezier(.22, 1, .36, 1) 120ms; white-space: nowrap;
}
.vtimer__done b { font-size: .9375rem; font-weight: 400; }
.vtimer__name { font-size: .8125rem; color: rgb(255 255 255 / .72); overflow: hidden; text-overflow: ellipsis; }
.vtimer.is-done { width: 196px; border-radius: 28px; box-shadow: inset 0 0 0 2px #f78b2e, 0 8px 24px rgb(0 0 0 / .22); }
.vtimer.is-done .vtimer__dial { opacity: 0; transform: scale(.6); }
.vtimer.is-done .vtimer__done { opacity: 1; transform: none; }
.vexit { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 24px; background: var(--scrim); animation: fade 240ms var(--ease); }
.vexit__card { width: min(100%, 22rem); display: grid; gap: 12px; padding: 24px; border-radius: var(--r-4); background: var(--menu-bg); color: var(--menu-ink); box-shadow: var(--menu-shadow); animation: vtimer-in 420ms var(--spring-soft) both; }
.vexit__card h3 { font-size: 1.1875rem; font-weight: 500; letter-spacing: -.01em; line-height: 1.25; }
.vexit__card p { font-size: .9375rem; line-height: 1.5; color: var(--menu-ink-2); }
.vexit__buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.vexit__buttons button { min-height: 44px; padding: 0 20px; border: 0; border-radius: var(--r-3); font-family: inherit; font-size: 1rem; cursor: pointer; }
.vexit__stay { background: var(--field); color: var(--menu-ink); }
.vexit__stay:hover { background: var(--hover); }
.vexit__go { background: var(--inverse); color: var(--inverse-ink); }
.vexit__go:active, .vexit__stay:active { transform: scale(.96); }
.vexit__buttons button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@keyframes vtimer-in { from { opacity: 0; transform: translateY(12px) scale(.92); } to { opacity: 1; transform: none; } }
.vstage__nav { grid-row: 3; display: flex; align-items: center; justify-content: center; gap: 28px; padding: 0 24px max(28px, env(safe-area-inset-bottom)); }
.vstage__where { min-width: 7rem; text-align: center; font-size: 1rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* a step comes in along a shallow arc from the side it was called from */
.vstage__step, .vstage__intro { animation: step-in 620ms var(--spring-soft) both; }
.vstage__step[data-dir="-1"] { animation-name: step-back; }
@keyframes step-in { from { opacity: 0; transform: translate(64px, 18px) rotate(1.2deg); } 55% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes step-back { from { opacity: 0; transform: translate(-64px, 18px) rotate(-1.2deg); } 55% { opacity: 1; } to { opacity: 1; transform: none; } }

@media (max-width: 767px) {
  .vw { padding: 16px 14px; }
  .vw__ings, .vw__pins { grid-template-columns: minmax(0, 1fr); }
  .vw__line li { grid-template-columns: 3.4rem minmax(0, 1fr); gap: 0 12px; }
  .vw__days li { grid-template-columns: 3.2rem auto minmax(0, 1fr) 2.2rem 2.2rem; gap: 8px; }
  .vw__card { min-height: 200px; }
  .vw__face { font-size: 1.125rem; padding: 18px; }
  .vw--flow .vw__scroll { justify-items: start; }
  .vstage__top { padding: 12px 12px 0 18px; }
  .vstage > .vstage__close { top: 12px; right: 12px; }
}

/* ------------------------------------------------------------------ a flowchart on the whole screen */
.vfull {
  width: 100vw; height: var(--app-h, 100dvh); max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--bg); color: var(--ink); overflow: hidden;
}
.vfull[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); animation: fade 320ms var(--ease); }
.vfull::backdrop { background: var(--bg); }
.vfull .i { display: block; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.vfull__body { min-height: 0; display: grid; place-items: center; padding: 16px 24px max(24px, env(safe-area-inset-bottom)); }
.vfull__body .vf { display: block; width: min(100%, var(--w) * 1.6); height: 100%; animation: dialog-in 520ms var(--spring-soft) both; }

/* ------------------------------------------------------------------ questions about a step, on the step's own screen */
.vstage__ask {
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px; margin-top: 6px; padding: 0 18px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong); cursor: pointer; font-family: inherit; font-size: 1rem;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform 320ms var(--spring);
}
.vstage__ask .i { width: 20px; height: 20px; }
.vstage__ask:hover { background: var(--hover); color: var(--ink); }
.vstage__ask:active { transform: scale(.96); }
.vstage[data-ask="true"] .vstage__ask { visibility: hidden; }
.vask {
  position: absolute; right: 24px; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 2;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(380px, calc(100vw - 32px)); height: min(460px, calc(var(--app-h, 100dvh) - 120px));
  border-radius: var(--r-4); background: var(--menu-bg); color: var(--menu-ink); box-shadow: var(--menu-shadow); overflow: hidden;
  transform-origin: 100% 100%; animation: open 460ms var(--spring) both;
}
.vask__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 18px; border-bottom: 1px solid var(--line); font-size: .9375rem; font-weight: 500; }
.vask__close, .vask__send { display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; }
.vask__close { background: transparent; color: var(--menu-ink-2); }
.vask__close:hover { background: var(--menu-hover); color: var(--menu-ink); }
.vask .i { width: 18px; height: 18px; }
.vask__log { display: flex; flex-direction: column; gap: 10px; padding: 14px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.vask__log:empty::before { content: "Ask anything about this step: a swap, a timing, what it should look like."; font-size: .9375rem; line-height: 1.5; color: var(--menu-ink-2); }
.vstage .vask__log p { font-size: .9375rem; line-height: 1.5; color: var(--menu-ink); white-space: pre-wrap; text-align: left; animation: arrive-venus 480ms var(--spring-soft) both; }
.vstage .vask__log .vask__you { align-self: flex-end; max-width: 86%; padding: 8px 14px; border-radius: var(--r-3) var(--r-3) var(--r-1) var(--r-3); background: var(--bubble); color: var(--bubble-ink); }
.vstage .vask__log .vask__wait { color: var(--menu-ink-2); font-family: var(--font-mono); font-size: .8125rem; }
.vask__form { display: flex; align-items: center; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.vask__form input {
  flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 0; border-radius: var(--r-3); outline: none;
  background: var(--field); color: var(--menu-ink); font: inherit; font-size: 1rem;
}
.vask__form input:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.vask__send { background: var(--send-bg); color: var(--send-ink); }
@media (max-width: 767px) {
  .vask { right: 12px; left: 12px; width: auto; bottom: max(12px, env(safe-area-inset-bottom)); height: min(420px, calc(var(--app-h, 100dvh) - 96px)); }
}
