/* The vault page (vault.html): the counter, the lock, the visitor's locks, the two dialogs. The shell, the sections,
   the steps, the fact rows and the capsules are the site's (shell.css, pieces.css); the dot labels and the plain rows
   are the coin page's (coin.css, loaded before this). Colors stay the site's: black, greys and white, green only for
   "connected", red only for "failed". Every class here starts with "v-". */

/* ---- "Demo data": a striped capsule fixed just under the menu bar, there the whole time with ?demo=1 ---- */
.v-demo {
  position: fixed; z-index: 45; left: 50%; top: calc(var(--sp-75) + 56px + var(--sp-75)); transform: translateX(-50%);
  display: inline-flex; align-items: center; height: 34px; padding: 0 var(--sp-200); border-radius: var(--r-full);
  color: var(--fg); white-space: nowrap; letter-spacing: 0.06em;
  background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.10) 0 6px, rgba(255, 255, 255, 0.02) 6px 12px), rgba(28, 28, 30, 0.95);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 12px 30px -10px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); pointer-events: none;
}
.s-page > .v-demo { width: auto; max-width: calc(100% - 2 * var(--sp-200)); }
/* The owner's try-out on the real network: the same capsule, plain (the stripes mean "not real") */
.v-demo.v-tryout { background: rgba(28, 28, 30, 0.95); }
.v-demo-on .v-state::before { box-shadow: none; background: repeating-linear-gradient(-45deg, var(--fg) 0 2px, transparent 2px 4px); }

/* ---- The state under the title: a hollow dot "Not open yet", or the striped one in the demo ---- */
.v-state { margin-top: 0; }

/* ---- Dotted bars: where a number will stand, in the roadmap's way of showing "not there yet" ---- */
.v-bars { display: inline-flex; align-items: center; height: 100%; }
.v-bars i {
  display: block; width: 88px; height: 14px; background: #7A7A7A;
  -webkit-mask-image: radial-gradient(circle, #000 1.2px, transparent 1.5px); mask-image: radial-gradient(circle, #000 1.2px, transparent 1.5px);
  -webkit-mask-size: 3.5px 3.5px; mask-size: 3.5px 3.5px;
}
/* While a number is on its way (demo only: chain shows the bars still) */
.v-wait .v-bars i { animation: v-breathe 1400ms ease-in-out infinite; }
@keyframes v-breathe { 50% { opacity: 0.4; } }

/* ---- The counter: three tiles of dark glass ---- */
.v-count { display: flex; flex-direction: column; gap: var(--sp-100); }
.v-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-75); margin: 0; padding: 0; list-style: none; }
.v-tile {
  display: grid; align-content: start; gap: var(--sp-50); min-height: 112px; padding: var(--sp-200); border-radius: var(--r-2xl);
  background: var(--s1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.v-num { display: flex; align-items: center; min-height: 32px; font: 500 20px/32px var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--fg); overflow-wrap: anywhere; }
.v-num.v-in { animation: v-in 400ms var(--ease) both; }
@keyframes v-in { from { opacity: 0; } }
.v-unit { color: var(--faint); overflow-wrap: anywhere; }
.v-count[data-live="no"] .v-unit { visibility: hidden; }
@media (max-width: 359px) {
  .v-tiles { grid-template-columns: minmax(0, 1fr); }
  .v-tile { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; min-height: 76px; column-gap: var(--sp-100); }
  .v-tile > .label:first-child { grid-column: 1 / -1; }
  .v-num { grid-column: 1; }
  .v-unit { grid-column: 2; grid-row: 2; }
}

/* ---- A short line under a control: what is happening, or what is wrong ---- */
.v-say { min-height: 20px; font-size: 14px; line-height: 20px; color: var(--soft); }
.v-say:empty { min-height: 0; }
.v-say.bad { color: var(--help); }
.v-field .v-say { min-height: 20px; }

/* ---- Connected: the wallet's name and short address, and Disconnect ---- */
.v-who {
  display: flex; align-items: center; gap: var(--sp-100); min-height: 56px; padding: var(--sp-75) var(--sp-75) var(--sp-75) var(--sp-200);
  border-radius: var(--r-full); background: var(--p-glass); box-shadow: var(--p-glass-edge);
}
.v-dot { flex: none; width: 8px; height: 8px; border-radius: var(--r-full); background: var(--safe); box-shadow: 0 0 0 4px rgba(51, 214, 74, 0.14); }
.v-who-t { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.v-who-t b { font: 500 15px/20px var(--mono); }

/* ---- The lock: one card of dark glass whose edge lights up toward the pointer (vault.js sets --sx and --sy) ---- */
.v-panel {
  position: relative; isolation: isolate; display: flex; flex-direction: column; gap: var(--sp-300);
  padding: var(--sp-300); border-radius: var(--r-3xl); background: var(--s1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}
.v-panel::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; background: radial-gradient(320px circle at var(--sx, 20%) var(--sy, 0%), rgba(255, 255, 255, 0.08), transparent 66%); }
.v-panel::after { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none; background: radial-gradient(260px circle at var(--sx, 20%) var(--sy, 0%), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.07) 72%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.v-panel > * { min-width: 0; }
@media (max-width: 479px) { .v-panel { padding: var(--sp-200); border-radius: var(--r-2xl); } }

.v-bal { display: grid; gap: var(--sp-50); }
.v-bal-n { display: flex; align-items: center; min-height: 40px; font: 500 28px/40px var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; overflow-wrap: anywhere; }

.v-field { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-75); min-width: 0; margin: 0; padding: 0; border: 0; }
.v-field legend { padding: 0; margin-bottom: var(--sp-75); }
.v-input {
  position: relative; display: flex; align-items: center; height: 64px; border-radius: var(--r-2xl); background: #0E0E0F;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 2px 8px rgba(0, 0, 0, 0.6); transition: box-shadow 200ms var(--ease);
}
.v-input:focus-within { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), inset 0 2px 8px rgba(0, 0, 0, 0.6); }
.v-input.bad { box-shadow: inset 0 0 0 1px rgba(255, 69, 59, 0.7), inset 0 2px 8px rgba(0, 0, 0, 0.6); }
.v-input input {
  flex: 1; width: 100%; min-width: 0; height: 100%; padding: 0 var(--sp-100) 0 var(--sp-200); border: 0; background: none; outline: none;
  font: 500 24px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--fg);
}
.v-input input::placeholder { color: var(--decor); }
.v-input:has(input:focus-visible) { outline: 2px solid var(--fg); outline-offset: 3px; }
.v-suffix { flex: none; padding-right: var(--sp-200); font: 400 13px/1 var(--mono); color: var(--faint); }
.v-quick { display: flex; gap: var(--sp-75); }
.v-quick .p-chip { flex: 1; }

/* ---- The six preset lock times: a sunken track and a white glass knob that slides to the one chosen ---- */
.v-seg {
  --n: 6; --i: 1; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  height: 64px; padding: 4px; border-radius: 20px; background: #0E0E0F;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 2px 8px rgba(0, 0, 0, 0.7);
}
.v-seg:has(input[value="0"]:checked) { --i: 0; }
.v-seg:has(input[value="1"]:checked) { --i: 1; }
.v-seg:has(input[value="2"]:checked) { --i: 2; }
.v-seg:has(input[value="3"]:checked) { --i: 3; }
.v-seg:has(input[value="4"]:checked) { --i: 4; }
.v-seg:has(input[value="5"]:checked) { --i: 5; }
.v-knob {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n)); border-radius: 16px; pointer-events: none;
  background: linear-gradient(180deg, #FFFFFF, #E2E2E7);
  box-shadow: inset 0 1px 0 #FFFFFF, inset 0 -1px 0 rgba(0, 0, 0, 0.22), 0 1px 2px rgba(0, 0, 0, 0.6), 0 10px 24px -8px rgba(255, 255, 255, 0.35);
  transform: translateX(calc(var(--i) * 100%)); transition: transform 460ms cubic-bezier(0.23, 1, 0.32, 1);
}
.v-seg label {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 0; border-radius: 16px; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none;
  color: var(--soft); transition: color 260ms var(--ease), transform 160ms var(--p-ease);
}
.v-seg label:hover { color: var(--fg); }
.v-seg label:active { transform: scale(0.94); }
.v-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.v-seg b { font: 600 14px/1 "Geist", system-ui, sans-serif; letter-spacing: -0.01em; white-space: nowrap; }
.v-seg i { font: 400 11px/1 var(--mono); font-style: normal; color: var(--faint); transition: color 260ms var(--ease); }
.v-seg label:has(input:checked) { color: var(--p-ink); }
.v-seg label:has(input:checked) i { color: #4A4A50; }
.v-seg label:has(input:focus-visible) { outline: 2px solid var(--fg); outline-offset: 2px; }
.v-seg.v-tap .v-knob { animation: v-tap 300ms var(--p-ease); }
@keyframes v-tap { 40% { scale: 1.06 0.92; } }
/* A time between the presets: the knob steps back, and the slider below says the time */
.v-seg:not(:has(input:checked)) .v-knob { opacity: 0; transform: translateX(calc(var(--i) * 100%)) scale(0.9); }
.v-knob { transition: transform 460ms cubic-bezier(0.23, 1, 0.32, 1), opacity 200ms var(--ease); }

/* ---- Any time in between: a sunken groove with a white glass thumb, whole hours on a log scale ---- */
.v-any { display: grid; gap: var(--sp-75); margin-top: var(--sp-200); }
.v-range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: none; cursor: pointer; }
.v-range::-webkit-slider-runnable-track { height: 10px; border-radius: 999px; background: #0E0E0F; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 2px 5px rgba(0, 0, 0, 0.7); }
.v-range::-moz-range-track { height: 10px; border-radius: 999px; background: #0E0E0F; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 2px 5px rgba(0, 0, 0, 0.7); }
.v-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; margin-top: -9px; border: 0; border-radius: 50%;
  background: linear-gradient(180deg, #FFFFFF, #DCDCE0); box-shadow: inset 0 1px 0 #FFFFFF, 0 2px 6px rgba(0, 0, 0, 0.6), 0 8px 18px -6px rgba(255, 255, 255, 0.3);
  transition: transform 160ms var(--p-ease);
}
.v-range::-moz-range-thumb { width: 28px; height: 28px; border: 0; border-radius: 50%; background: linear-gradient(180deg, #FFFFFF, #DCDCE0); box-shadow: inset 0 1px 0 #FFFFFF, 0 2px 6px rgba(0, 0, 0, 0.6); }
.v-range:active::-webkit-slider-thumb { transform: scale(1.12); }
.v-range:focus-visible { outline: none; }
.v-range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--fg); outline-offset: 3px; }
.v-range:focus-visible::-moz-range-thumb { outline: 2px solid var(--fg); outline-offset: 3px; }
@media (max-width: 400px) { .v-seg b { font-size: 12.5px; } .v-seg i { font-size: 10px; } }

/* ---- The read-out and the share ---- */
.v-read b { font-variant-numeric: tabular-nums; }
.v-share { display: grid; gap: var(--sp-50); padding: var(--sp-200) var(--sp-200) var(--sp-200); border-radius: var(--r-2xl); background: var(--s2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.v-share-n { display: flex; align-items: center; min-height: 52px; font: 600 44px/52px "Geist", system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.v-share-n.v-low { color: var(--faint); }
.v-share-n small { margin-right: var(--sp-75); font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--dim); }
.v-share p { color: var(--soft); }
.v-to { color: var(--faint); }
.v-panel .s-acts .p-sheen { flex: 1 1 100%; }

/* ---- Your locks: one card each ---- */
.v-locks { display: flex; flex-direction: column; gap: var(--sp-75); margin: 0; padding: 0; list-style: none; }
.v-lock { display: grid; gap: var(--sp-200); padding: var(--sp-200) var(--sp-300); border-radius: var(--r-2xl); background: var(--s1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.05); }
.v-lock.v-ended { background: var(--s2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.v-lock-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-200); }
.v-lock-top > div { display: grid; gap: var(--sp-25); min-width: 0; }
.v-lock-amt { font: 500 18px/24px var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.v-left { display: grid; justify-items: end; gap: var(--sp-25); text-align: right; }
.v-left b { font: 500 15px/24px var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.v-lock-spec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-100); margin: 0; padding: 0; list-style: none; }
.v-lock-spec li { display: grid; gap: var(--sp-25); min-width: 0; }
.v-lock-spec b { font: 500 14px/20px var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.v-lock .s-acts .p-b { flex: 1 1 140px; }
.v-lock .v-still { margin: 0; }
@media (max-width: 479px) {
  .v-lock { padding: var(--sp-200); }
  .v-lock-spec { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ---- The dialogs: a sheet of glass over a dimmed, blurred page ---- */
.v-dlg {
  width: min(440px, calc(100% - 2 * var(--sp-200))); max-width: none; max-height: calc(100% - 2 * var(--sp-200)); margin: auto; padding: 0; border: 0;
  border-radius: var(--r-3xl); color: var(--fg); background: rgba(30, 30, 33, 0.97); -webkit-backdrop-filter: blur(40px); backdrop-filter: blur(40px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 40px 90px -30px rgba(0, 0, 0, 1);
  opacity: 0; transform: translateY(12px) scale(0.98);
  transition: opacity 260ms var(--ease), transform 420ms cubic-bezier(0.23, 1, 0.32, 1), display 420ms, overlay 420ms; transition-behavior: allow-discrete;
}
.v-dlg[open] { opacity: 1; transform: none; }
@starting-style { .v-dlg[open] { opacity: 0; transform: translateY(12px) scale(0.98); } }
.v-dlg::backdrop { background-color: rgba(0, 0, 0, 0); transition: background-color 300ms var(--ease), display 300ms, overlay 300ms; transition-behavior: allow-discrete; }
.v-dlg[open]::backdrop { background-color: rgba(0, 0, 0, 0.66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@starting-style { .v-dlg[open]::backdrop { background-color: rgba(0, 0, 0, 0); } }
.v-dlg-in { display: flex; flex-direction: column; gap: var(--sp-200); padding: var(--sp-300); }
.v-dlg h2 { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.v-dlg p { color: var(--soft); }
.v-dlg .s-acts .p-b { flex: 1 1 140px; }
.v-dlg .s-spec b { font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; }
.v-dlg .v-warn { color: var(--fg); font-weight: 500; }

.v-wallets { display: flex; flex-direction: column; gap: var(--sp-75); margin: 0; padding: 0; list-style: none; }
.v-wallets .p-b { justify-content: flex-start; width: 100%; height: 60px; padding: 0 var(--sp-200); border-radius: var(--r-2xl); color: var(--fg); background: var(--p-glass); box-shadow: var(--p-glass-edge); }
.v-wallets .p-b:hover { filter: brightness(1.15); }
.v-wallets .p-b:focus-visible { border-radius: var(--r-2xl); }
.v-wallets img, .v-wi { width: 28px; height: 28px; flex: none; border-radius: 8px; }
.v-wi { display: grid; place-items: center; background: #0E0E0F; font: 500 12px/1 var(--mono); color: var(--dim); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }

/* The mark beside the dialog's title: three dots that light in turn while waiting, one green dot when done, one red
   dot when it failed, three hollow ones when the outcome is not known */
.v-flow-top { display: flex; align-items: center; gap: var(--sp-100); }
.v-flow-mark { display: inline-flex; gap: 5px; flex: none; }
.v-flow-mark[data-mark="none"] { display: none; }
.v-flow-mark i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.v-flow-mark[data-mark="wait"] i { animation: v-hop 1200ms linear infinite; }
.v-flow-mark[data-mark="wait"] i:nth-child(2) { animation-delay: 200ms; }
.v-flow-mark[data-mark="wait"] i:nth-child(3) { animation-delay: 400ms; }
@keyframes v-hop { 0%, 15% { background: var(--fg); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14); } 40%, 100% { background: var(--faint); box-shadow: none; } }
.v-flow-mark[data-mark="ok"] i:not(:first-child), .v-flow-mark[data-mark="bad"] i:not(:first-child) { display: none; }
.v-flow-mark[data-mark="ok"] i { background: var(--safe); box-shadow: 0 0 0 4px rgba(51, 214, 74, 0.16); }
.v-flow-mark[data-mark="bad"] i { background: var(--help); box-shadow: 0 0 0 4px rgba(255, 69, 59, 0.16); }
.v-flow-mark[data-mark="unknown"] i { background: none; box-shadow: inset 0 0 0 1.5px var(--faint); }

@media (prefers-reduced-motion: reduce) {
  .v-knob, .v-seg label, .v-seg i, .v-input, .v-dlg, .v-dlg::backdrop, .v-range::-webkit-slider-thumb { transition: none; }
  .v-seg label:active { transform: none; }
  .v-seg.v-tap .v-knob, .v-num.v-in, .v-wait .v-bars i { animation: none; }
  .v-flow-mark[data-mark="wait"] i { animation: none; background: var(--fg); }
}
@media (forced-colors: active) {
  .v-knob { background: Highlight; }
  .v-seg label:has(input:checked) { color: HighlightText; }
  .v-bars i { background: CanvasText; }
}

/* Fix round 2026-11-30: the two readings of an amount as buttons (M1), the vault's address in full (M5). */
.v-which { margin: 6px 6px 0 0; font-variant-numeric: tabular-nums; }
.v-gone code { font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.86em; overflow-wrap: anywhere; word-break: break-all; }
.v-addr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
