/* MultiTool components · v1
   Prefix: .mt-  ·  every capsule = outline + gloss  ·  tool color via [data-tool] scope */

/* ── Panel ──────────────────────────────────────────────────────── */
.mt-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--gloss);
}
.mt-panel--raised { box-shadow: var(--gloss), var(--sh-2); }
.mt-panel--glass { background: var(--glass); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3); backdrop-filter: blur(var(--glass-blur)) saturate(1.3); border-color: var(--glass-border); box-shadow: inset 0 1px 0 var(--glass-hi), var(--sh-2); }
.mt-panel--well { background: var(--paper-2); box-shadow: none; }
.mt-panel--tool { background: var(--tool-soft); border-color: color-mix(in oklch, var(--tool) 35%, var(--line)); }
.mt-panel__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }

/* ── Button ─────────────────────────────────────────────────────── */
.mt-btn {
  --h: 44px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: var(--h); padding: 0 20px;
  border-radius: var(--r-pill);
  border: var(--bw) solid var(--outline);
  background-color: var(--g-500);
  background-image: linear-gradient(115deg, transparent 42%, oklch(1 0 0 / 0.42) 50%, transparent 58%);
  background-size: 260% 100%; background-position: 130% 0; background-repeat: no-repeat;
  color: var(--g-950);
  isolation: isolate;
  font-weight: 700; font-size: var(--t-15); line-height: 1; letter-spacing: -0.005em;
  white-space: nowrap; text-decoration: none;
  box-shadow: var(--gloss);
  transition: background-color var(--d-2) var(--e-out), background-position 0s, color var(--d-2) var(--e-out), border-color var(--d-2) var(--e-out),
              box-shadow var(--d-2) var(--e-out), transform var(--d-1) var(--e-out), opacity var(--d-2) var(--e-out);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.mt-btn:hover { background-color: var(--g-400); background-position: -130% 0; transition-property: background-color, background-position, color, border-color, box-shadow, transform, opacity; transition-duration: var(--d-2), 1400ms, var(--d-2), var(--d-2), var(--d-2), var(--d-1), var(--d-2); transition-timing-function: var(--e-out), var(--e-out-x), var(--e-out), var(--e-out), var(--e-out), var(--e-out), var(--e-out); }
.mt-btn:active, .mt-btn.is-active { transform: scale(0.98); box-shadow: var(--gloss-off); background-color: var(--g-600); }
.mt-btn:focus-visible { box-shadow: var(--gloss), var(--ring); border-radius: var(--r-pill); }
.mt-btn:disabled, .mt-btn[aria-disabled="true"] { background-image: none; background-color: var(--paper-3); color: var(--ink-3); border-color: var(--line-2); box-shadow: none; cursor: not-allowed; transform: none; }
.mt-btn svg { width: 18px; height: 18px; flex: none; }

.mt-btn--sm { --h: 36px; padding: 0 14px; font-size: var(--t-13); }
.mt-btn--sm svg { width: 16px; height: 16px; }
.mt-btn--lg { --h: 52px; padding: 0 26px; font-size: var(--t-18); }
.mt-btn--lg svg { width: 20px; height: 20px; }
.mt-btn--block { display: flex; width: 100%; }
.mt-btn--icon { width: var(--h); padding: 0; }

.mt-btn--secondary { background-color: var(--paper); color: var(--ink); border-color: var(--line-2); }
.mt-btn--secondary:hover { background-color: var(--paper-2); border-color: var(--ink-4); }
.mt-btn--secondary:active { background-color: var(--paper-3); }

.mt-btn--ghost { background-color: transparent; color: var(--ink-2); border-color: transparent; box-shadow: none; }
.mt-btn--ghost:hover { background-color: var(--paper-3); color: var(--ink); }
.mt-btn--ghost:active { background-color: var(--paper-4); }

.mt-btn--tool { background-color: var(--tool); color: var(--tool-on); border-color: var(--tool-ink); }
.mt-btn--tool:hover { background-color: var(--tool-deep); }
.mt-btn--tool:active { background-color: var(--tool-ink); }
.mt-btn--tool-soft { background-color: var(--tool-soft); color: var(--tool-ink); border-color: color-mix(in oklch, var(--tool) 45%, transparent); }
.mt-btn--tool-soft:hover { background-color: color-mix(in oklch, var(--tool) 22%, var(--paper)); }

.mt-btn--danger { background-color: var(--paper); color: var(--danger-ink); border-color: color-mix(in oklch, var(--danger) 50%, transparent); }
.mt-btn--danger:hover { background-color: var(--danger-soft); }
.mt-btn--danger:active { background-color: var(--danger); color: var(--burn-on); border-color: var(--danger-ink); }

.mt-btn--link { background-color: transparent; border: 0; box-shadow: none; color: var(--g-700); padding: 0; height: auto; font-weight: 600; text-decoration: underline; text-decoration-color: var(--g-300); text-underline-offset: 0.15em; }
.mt-btn--link:hover { color: var(--g-900); text-decoration-color: var(--g-500); background-color: transparent; }

/* loading: ring replaces label, width kept */
.mt-btn.is-loading { color: transparent !important; pointer-events: none; }
.mt-btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid color-mix(in oklch, currentColor 0%, var(--g-950) 25%);
  border-top-color: var(--g-950);
  animation: mt-spin 0.8s linear infinite;
}
.mt-btn--tool.is-loading::after { border-color: color-mix(in oklch, var(--tool-on) 30%, transparent); border-top-color: var(--tool-on); }
.mt-btn--secondary.is-loading::after, .mt-btn--ghost.is-loading::after { border-color: var(--line-2); border-top-color: var(--ink); }
@keyframes mt-spin { to { transform: rotate(360deg); } }

/* shine sweep lives in background-image (under the text): see .mt-btn base + :hover */
.mt-btn--ghost, .mt-btn--link { background-image: none; }

/* liquid fill: tool buttons fill from the bottom with a wavy edge (markup: <i class="mt-btn__liquid"></i>) */
.mt-btn__liquid {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; overflow: hidden; z-index: -1;
}
.mt-btn__liquid::before {
  content: ""; position: absolute; left: -50%; right: -50%; bottom: 0; height: calc(100% + 16px);
  background-color: var(--tool-deep);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 16' preserveAspectRatio='none'%3E%3Cpath d='M0 8 Q10 0 20 8 T40 8 T60 8 T80 8 V16 H0 Z' fill='%23000'/%3E%3C/svg%3E") repeat-x left top / 80px 16px, linear-gradient(#000 0 0) left 16px / 100% calc(100% - 16px) no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 16' preserveAspectRatio='none'%3E%3Cpath d='M0 8 Q10 0 20 8 T40 8 T60 8 T80 8 V16 H0 Z' fill='%23000'/%3E%3C/svg%3E") repeat-x left top / 80px 16px, linear-gradient(#000 0 0) left 16px / 100% calc(100% - 16px) no-repeat;
  transform: translateY(calc(100% + 2px));
  transition: transform 520ms var(--e-out-x);
  animation: mt-liquid-x 1.6s linear infinite;
}
.mt-btn:hover .mt-btn__liquid::before, .mt-btn:focus-visible .mt-btn__liquid::before { transform: translateY(-6px); }
@keyframes mt-liquid-x { from { -webkit-mask-position: 0 0, 0 16px; mask-position: 0 0, 0 16px; } to { -webkit-mask-position: 80px 0, 0 16px; mask-position: 80px 0, 0 16px; } }

/* ── Glass material ──────────────────────────────────────────────── */
.mt-glass {
  position: relative;
  background-color: var(--glass);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
          backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
  border: 1px solid transparent;
  background-clip: padding-box;
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--sh-2);
}
.mt-glass::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(160deg, var(--glass-border), transparent 45%, transparent 70%, var(--glass-border));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.mt-glass--strong { background-color: var(--glass-strong); }
.mt-glass--glow { box-shadow: inset 0 1px 0 var(--glass-hi), var(--sh-2), var(--glow); }
.mt-glass--tool { box-shadow: inset 0 1px 0 var(--glass-hi), var(--sh-2), 0 0 40px -10px color-mix(in oklch, var(--tool) 55%, transparent); }
.mt-glass--tool::before { background: linear-gradient(160deg, color-mix(in oklch, var(--tool) 70%, transparent), transparent 45%, transparent 70%, color-mix(in oklch, var(--tool) 45%, transparent)); }

/* ── Contour trace: a light travels along the outline ────────────── */
.mt-trace { position: relative; }
.mt-tool[aria-checked="true"] { --trace-o: 0.85; --trace-ms: 4.2s; }
.mt-trace:not(.is-loading)::after, .mt-tool[aria-checked="true"]::after {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--mt-a), transparent 0 58%, color-mix(in oklch, var(--tool-glow) 0%, transparent) 58%, var(--tool-glow) 78%, var(--tool) 88%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: mt-trace var(--trace-ms, 3.6s) linear infinite;
  opacity: var(--trace-o, 1);
  filter: drop-shadow(0 0 6px color-mix(in oklch, var(--tool) 70%, transparent));
}
.mt-trace--soft { --trace-o: 0.7; --trace-ms: 5s; }
.mt-trace--fast { --trace-ms: 1.8s; }
.mt-trace--hover:not(:hover):not(:focus-visible)::after { opacity: 0; }
.mt-trace--hover::after { transition: opacity var(--d-3) var(--e-out); }
@keyframes mt-trace { to { --mt-a: 360deg; } }

/* ── Button group / segmented ───────────────────────────────────── */
.mt-segmented {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--paper-3); border: 1px solid var(--line); border-radius: var(--r-pill);
}
.mt-segmented > button, .mt-segmented > label {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--ink-2); font-weight: 600; font-size: var(--t-13); cursor: pointer;
  transition: background var(--d-2) var(--e-out), color var(--d-2) var(--e-out), box-shadow var(--d-2) var(--e-out);
}
.mt-segmented > button:hover { color: var(--ink); }
.mt-segmented > [aria-pressed="true"], .mt-segmented > .is-on, .mt-segmented > label:has(input:checked) {
  background: var(--paper); color: var(--ink); box-shadow: var(--gloss), var(--sh-1);
}
.mt-segmented input { position: absolute; opacity: 0; pointer-events: none; }

/* ── Field / Input ──────────────────────────────────────────────── */
.mt-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mt-field > label, .mt-label { font-size: var(--t-13); font-weight: 600; color: var(--ink-2); letter-spacing: 0.01em; }
.mt-field__hint { font-size: var(--t-12); color: var(--ink-3); line-height: 1.4; }
.mt-field__error { display: flex; gap: 6px; align-items: center; font-size: var(--t-12); color: var(--burn-ink); font-weight: 600; }
.mt-field__error svg { width: 14px; height: 14px; }
.mt-field.is-invalid .mt-input, .mt-field.is-invalid .mt-select { border-color: var(--burn); }
.mt-field.is-invalid .mt-input:focus-within { box-shadow: var(--ring-field-danger); }
.mt-field.is-valid .mt-input { border-color: var(--g-500); }

.mt-input {
  display: flex; align-items: center; gap: var(--s-2);
  height: 44px; padding: 0 16px;
  background: var(--paper); color: var(--ink);
  border: var(--bw) solid var(--line-2); border-radius: var(--r-pill);
  box-shadow: inset 0 1px 2px oklch(0.3 0.04 180 / 0.05);
  transition: border-color var(--d-2) var(--e-out), box-shadow var(--d-2) var(--e-out), background var(--d-2) var(--e-out);
}
.mt-input:hover { border-color: var(--ink-4); }
.mt-input:focus-within { border-color: var(--g-500); box-shadow: var(--ring-field); }
.mt-input input, .mt-input textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0; height: 100%; }
.mt-input input:focus-visible, .mt-input textarea:focus-visible { box-shadow: none; }   /* the capsule draws the one focus ring; the global :focus-visible ring on the bare control made a second, smaller one */
.mt-input input::placeholder, .mt-input textarea::placeholder { color: var(--ink-4); }
.mt-input input[type="number"] { font-family: var(--font-mono); font-variation-settings: "wdth" 95; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.mt-input input[type="number"]::-webkit-outer-spin-button, .mt-input input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
.mt-input__suffix, .mt-input__prefix { font-size: var(--t-13); font-weight: 600; color: var(--ink-3); white-space: nowrap; font-family: var(--font-mono); font-variation-settings: "wdth" 90; }
.mt-input__icon { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.mt-input--textarea { height: auto; min-height: 96px; padding: 12px 16px; border-radius: 18px; align-items: stretch; }
.mt-input--textarea textarea { resize: vertical; line-height: 1.45; min-height: 72px; }
.mt-input--mono input { font-family: var(--font-mono); font-variation-settings: "wdth" var(--wdth-mono); font-size: var(--t-13); }
.mt-input:has(input:disabled), .mt-input:has(textarea:disabled) { background: var(--paper-3); color: var(--ink-3); border-color: var(--line); box-shadow: none; }
.mt-input--sm { height: 36px; padding: 0 12px; font-size: var(--t-13); }

/* inline stepper for numbers */
.mt-input__step { display: inline-flex; gap: 2px; margin-right: -8px; }
.mt-input__step button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--paper-3); color: var(--ink-2); display: grid; place-items: center; transition: background var(--d-1) var(--e-out), transform var(--d-1) var(--e-out); }
.mt-input__step button:hover { background: var(--g-100); color: var(--g-900); }
.mt-input__step button:active { transform: scale(0.92); }
.mt-input__step svg { width: 14px; height: 14px; }

/* select */
.mt-select { position: relative; display: block; }
.mt-select select {
  width: 100%; height: 44px; padding: 0 44px 0 16px; appearance: none; -webkit-appearance: none;
  background: var(--paper); color: var(--ink); border: var(--bw) solid var(--line-2); border-radius: var(--r-pill);
  box-shadow: inset 0 1px 2px oklch(0.3 0.04 180 / 0.05); cursor: pointer;
  transition: border-color var(--d-2) var(--e-out), box-shadow var(--d-2) var(--e-out);
}
.mt-select select:hover { border-color: var(--ink-4); }
.mt-select select:focus-visible { border-color: var(--g-500); box-shadow: var(--ring-field); outline: 0; }
.mt-select::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 10px; height: 10px; pointer-events: none;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2);
  transform: translateY(-70%) rotate(45deg);
}

/* file drop */
.mt-drop {
  display: grid; place-items: center; gap: 6px; text-align: center;
  min-height: 132px; padding: var(--s-4);
  border: 1.5px dashed var(--line-2); border-radius: var(--r-md); background: var(--paper-2);
  color: var(--ink-2); cursor: pointer;
  transition: border-color var(--d-2) var(--e-out), background var(--d-2) var(--e-out), transform var(--d-2) var(--e-out);
}
.mt-drop:hover, .mt-drop.is-over { border-color: var(--g-500); background: var(--g-50); color: var(--g-900); }
.mt-drop.is-over { transform: scale(1.01); }
.mt-drop svg { width: 26px; height: 26px; color: var(--g-600); }
.mt-drop b { font-weight: 700; color: var(--ink); }
.mt-drop small { color: var(--ink-3); }
.mt-drop__preview { width: 64px; height: 64px; border-radius: var(--r-md); object-fit: cover; border: 1px solid var(--line); }

/* switch */
.mt-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--t-15); }
.mt-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.mt-switch__track {
  width: 44px; height: 26px; border-radius: var(--r-pill); background: var(--paper-4); border: var(--bw) solid var(--line-2);
  position: relative; transition: background var(--d-2) var(--e-out), border-color var(--d-2) var(--e-out); flex: none;
}
.mt-switch__track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--paper); box-shadow: 0 1px 2px oklch(0.3 0.04 180 / 0.25); transition: transform var(--d-2) var(--e-out-x);
}
.mt-switch input:checked + .mt-switch__track { background: var(--g-500); border-color: var(--g-900); }
.mt-switch input:checked + .mt-switch__track::after { transform: translateX(18px); }
.mt-switch input:focus-visible + .mt-switch__track { box-shadow: var(--ring); }
.mt-switch input:disabled + .mt-switch__track { opacity: 0.5; cursor: not-allowed; }

/* range (percent) */
.mt-range { display: grid; gap: 8px; }
.mt-range__head { display: flex; justify-content: space-between; align-items: baseline; }
.mt-range input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; }
.mt-range input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--tool) 0 var(--pct, 50%), var(--paper-4) var(--pct, 50%) 100%); border: 1px solid var(--line-2); }
.mt-range input[type="range"]::-moz-range-track { height: 8px; border-radius: 99px; background: var(--paper-4); border: 1px solid var(--line-2); }
.mt-range input[type="range"]::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--tool); }
.mt-range input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: var(--paper); border: var(--bw) solid var(--tool-ink); box-shadow: var(--gloss), var(--sh-1); cursor: grab; transition: transform var(--d-1) var(--e-out); }
.mt-range input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--paper); border: var(--bw) solid var(--tool-ink); box-shadow: var(--sh-1); cursor: grab; }
.mt-range input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.1); cursor: grabbing; }
.mt-range input[type="range"]:focus-visible { outline: 0; }
.mt-range input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: var(--ring); }

/* ── Tool selector (radiogroup of 5 capsules = launch modes) ────── */
.mt-tools { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-2); }
@media (max-width: 640px) { .mt-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mt-tool {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 104px;
  padding: 14px 14px 12px; border-radius: var(--r-md);
  border: var(--bw) solid var(--line-2); background: var(--paper); color: var(--ink); text-align: left; cursor: pointer;
  box-shadow: var(--gloss);
  transition: border-color var(--d-2) var(--e-out), background var(--d-3) var(--e-out), transform var(--d-1) var(--e-out), box-shadow var(--d-2) var(--e-out);
}
.mt-tool:hover { border-color: color-mix(in oklch, var(--tool) 55%, var(--line-2)); background: color-mix(in oklch, var(--tool-soft) 60%, var(--paper)); }
.mt-tool:active { transform: scale(0.985); }
.mt-tool:focus-visible { box-shadow: var(--gloss), var(--ring); outline: 0; }
.mt-tool[aria-checked="true"], .mt-tool.is-on { background: var(--tool-soft); border-color: var(--tool); box-shadow: var(--gloss), 0 0 0 1px var(--tool), 0 0 28px -8px color-mix(in oklch, var(--tool) 60%, transparent); }
.mt-tool__head { display: flex; align-items: center; justify-content: space-between; }
.mt-tool__icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-3); color: var(--ink-2); transition: background var(--d-2) var(--e-out), color var(--d-2) var(--e-out), transform var(--d-3) var(--e-out-x); }
.mt-tool__icon svg { width: 18px; height: 18px; }
.mt-tool[aria-checked="true"] .mt-tool__icon, .mt-tool.is-on .mt-tool__icon { background: var(--tool); color: var(--tool-on); transform: scale(1.08); }
.mt-tool__check { width: 18px; height: 18px; border-radius: 50%; border: var(--bw) solid var(--line-2); display: grid; place-items: center; color: transparent; transition: all var(--d-2) var(--e-out); }
.mt-tool__check svg { width: 11px; height: 11px; }
.mt-tool[aria-checked="true"] .mt-tool__check, .mt-tool.is-on .mt-tool__check { background: var(--tool); border-color: var(--tool-ink); color: var(--tool-on); }
.mt-tool__name { font-weight: 800; font-size: var(--t-15); letter-spacing: -0.01em; font-variation-settings: "wdth" 104; }
.mt-tool__desc { font-size: var(--t-12); color: var(--ink-3); line-height: 1.35; }
.mt-tool[aria-checked="true"] .mt-tool__desc, .mt-tool.is-on .mt-tool__desc { color: var(--tool-ink); }

/* ── Chips / status ─────────────────────────────────────────────── */
.mt-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: var(--r-pill); font-size: var(--t-12); font-weight: 700; letter-spacing: 0.01em; white-space: nowrap;
  background: var(--paper-3); color: var(--ink-2); border: 1px solid var(--line);
}
.mt-chip svg { width: 13px; height: 13px; }
.mt-chip__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mt-chip--ok, .mt-chip--locked { background: var(--g-100); color: var(--g-900); border-color: var(--g-300); }
.mt-chip--live { background: var(--g-100); color: var(--g-900); border-color: var(--g-300); }
.mt-chip--live .mt-chip__dot { background: var(--g-600); box-shadow: 0 0 0 0 var(--g-500); animation: mt-pulse 1.8s var(--e-out) infinite; }
.mt-chip--pending, .mt-chip--warn { background: var(--amber-soft); color: var(--amber-ink); border-color: color-mix(in oklch, var(--amber) 50%, transparent); }
.mt-chip--retry, .mt-chip--danger { background: var(--burn-soft); color: var(--burn-ink); border-color: color-mix(in oklch, var(--burn) 45%, transparent); }
.mt-chip--info { background: var(--water-soft); color: var(--water-ink); border-color: color-mix(in oklch, var(--water) 45%, transparent); }
.mt-chip--dry { background: var(--paper-2); color: var(--ink-3); border-style: dashed; }
.mt-chip--tool { background: var(--tool-soft); color: var(--tool-ink); border-color: color-mix(in oklch, var(--tool) 45%, transparent); }
.mt-chip--solid { background: var(--tool); color: var(--tool-on); border-color: var(--tool-ink); }
.mt-chip__spin { width: 11px; height: 11px; border-radius: 50%; border: 2px solid color-mix(in oklch, currentColor 30%, transparent); border-top-color: currentColor; animation: mt-spin 0.9s linear infinite; }
@keyframes mt-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--g-500) 60%, transparent); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ── Address + proof ────────────────────────────────────────────── */
.mt-addr {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 6px 0 10px;
  border-radius: var(--r-pill); background: var(--paper-2); border: 1px solid var(--line);
  font-family: var(--font-mono); font-variation-settings: "wdth" var(--wdth-mono); font-size: var(--t-13); color: var(--ink);
}
.mt-addr__id { width: 16px; height: 16px; border-radius: 50%; flex: none; background: conic-gradient(from var(--a, 40deg), var(--g-500), var(--water), var(--holders), var(--stocks), var(--g-500)); }
.mt-addr__img { width: 18px; height: 18px; border-radius: 50%; flex: none; object-fit: cover; background: var(--paper-3); }
.mt-addr--btn { cursor: pointer; font: inherit; font-family: var(--font-mono); transition: border-color var(--d-1) var(--e-out), background var(--d-1) var(--e-out); }
.mt-addr--btn:hover { border-color: var(--ink-4); background: var(--paper-3); }
.mt-addr--btn:hover .mt-addr__copy { color: var(--ink); }
.mt-addr__copy { width: 24px; height: 24px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-3); display: grid; place-items: center; transition: background var(--d-1) var(--e-out), color var(--d-1) var(--e-out); }
.mt-addr__copy:hover { background: var(--g-100); color: var(--g-900); }
.mt-addr__copy svg { width: 14px; height: 14px; }
.mt-addr.is-copied .mt-addr__copy { color: var(--g-700); background: var(--g-100); }

.mt-proof {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px 0 10px;
  border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  font-family: var(--font-mono); font-variation-settings: "wdth" var(--wdth-mono); font-size: var(--t-12); text-decoration: none;
  transition: border-color var(--d-2) var(--e-out), background var(--d-2) var(--e-out), transform var(--d-1) var(--e-out);
}
.mt-proof:hover { border-color: var(--g-500); background: var(--g-50); color: var(--g-900); }
.mt-proof:active { transform: scale(0.98); }
.mt-proof__kind { font-family: var(--font-ui); font-variation-settings: "wdth" 100; font-weight: 700; font-size: var(--t-12); color: var(--tool-ink); background: var(--tool-soft); border-radius: var(--r-pill); padding: 2px 7px; }
.mt-proof__arrow { width: 13px; height: 13px; color: var(--ink-3); transition: transform var(--d-2) var(--e-out); }
.mt-proof:hover .mt-proof__arrow { transform: translate(1px, -1px); color: var(--g-700); }

/* ── Receipt (key/value rows with leaders; replaces metric tiles) ─ */
.mt-receipt { display: grid; gap: 6px; font-family: var(--font-mono); font-variation-settings: "wdth" var(--wdth-mono); font-variant-numeric: tabular-nums; font-size: var(--t-13); }
.mt-receipt__row { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 10px; min-width: 0; }
.mt-receipt__k { color: var(--ink-3); font-family: var(--font-ui); font-variation-settings: "wdth" 100; font-weight: 600; font-size: var(--t-12); letter-spacing: 0.01em; }
.mt-receipt__lead { border-bottom: 1.5px dotted var(--line-2); transform: translateY(-4px); }
.mt-receipt__v { color: var(--ink); font-weight: 500; white-space: nowrap; }
.mt-receipt__v.is-tool { color: var(--tool-ink); font-weight: 700; }
.mt-receipt__v.is-ok { color: var(--g-800); font-weight: 700; }
.mt-receipt--lg { font-size: var(--t-15); gap: 10px; }
.mt-receipt__total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; }
.mt-receipt__total .mt-receipt__k { color: var(--ink); font-weight: 700; }
.mt-receipt__total .mt-receipt__v { font-weight: 800; font-size: 1.1em; }
/* list variant: for prose values (what a tool does, asset names). Fixed key column, value left-aligned and wrapping cleanly, hairline rows —
   the dotted-leader form only works when the value is a number that fits on one line. */
.mt-receipt--list { gap: 0; }
.mt-receipt--list .mt-receipt__row { grid-template-columns: 104px minmax(0, 1fr); gap: 12px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mt-receipt--list .mt-receipt__row:first-child { padding-top: 0; }
.mt-receipt--list .mt-receipt__row:last-child { border-bottom: 0; padding-bottom: 0; }
.mt-receipt--list .mt-receipt__lead { display: none; }
.mt-receipt--list .mt-receipt__k { padding-top: 2px; }
.mt-receipt--list .mt-receipt__v { white-space: normal; text-align: left; line-height: 1.45; text-wrap: pretty; max-width: none; display: block; }
.mt-receipt--list .mt-receipt__v .ap__logo--xs { vertical-align: -4px; }
@media (max-width: 420px) { .mt-receipt--list .mt-receipt__row { grid-template-columns: 84px minmax(0, 1fr); } }

/* ── Stat strip (for headers: 3-4 numbers in a row, mono, hairline separators) ─ */
.mt-stats { display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); overflow: hidden; }
.mt-stat { flex: 1; padding: 12px 16px; min-width: 0; border-right: 1px solid var(--line); }
.mt-stat:last-child { border-right: 0; }
.mt-stat__k { font-size: var(--t-12); font-weight: 600; color: var(--ink-3); letter-spacing: 0.01em; }
.mt-stat__v { font-family: var(--font-mono); font-variation-settings: "wdth" 95; font-variant-numeric: tabular-nums; font-size: var(--t-18); font-weight: 600; color: var(--ink); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-stat__v small { font-size: var(--t-12); color: var(--ink-3); font-weight: 500; margin-left: 4px; }
.mt-stat--tool .mt-stat__v { color: var(--tool-ink); }
@media (max-width: 720px) { .mt-stats { flex-wrap: wrap; } .mt-stat { flex: 1 1 50%; border-bottom: 1px solid var(--line); } .mt-stat:nth-child(2n) { border-right: 0; } .mt-stat:nth-last-child(-n+2) { border-bottom: 0; } }

/* ── Gauge (pool fill toward gate; fills with the tool's material) ─ */
.mt-gauge { display: grid; gap: 8px; }
.mt-gauge__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.mt-gauge__bar {
  position: relative; height: 22px; border-radius: var(--r-pill); overflow: hidden;
  background: var(--paper-3); border: var(--bw) solid var(--line-2); box-shadow: inset 0 1px 2px oklch(0.3 0.04 180 / 0.06);
}
.mt-gauge__fill {
  position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--fill, 0));
  background: var(--tool); transition: transform var(--d-5) var(--e-out-x);
}
.mt-gauge__fill::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.45); }
.mt-gauge__gate { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); left: var(--gate, 100%); transform: translateX(-1px); }
.mt-gauge__gate::after { content: attr(data-label); position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 4px; font-size: var(--t-12); font-weight: 600; color: var(--ink-2); white-space: nowrap; font-family: var(--font-mono); font-variation-settings: "wdth" 90; }
.mt-gauge--gated { padding-bottom: 18px; }
/* materials */
.mt-gauge[data-tool="burn"] .mt-gauge__fill { background: linear-gradient(90deg, var(--burn-deep), var(--burn) 70%, var(--burn-glow)); }
.mt-gauge[data-tool="burn"] .mt-gauge__fill::before { content: ""; position: absolute; right: -6px; top: -6px; bottom: -6px; width: 22px; background: radial-gradient(10px 14px at 40% 60%, var(--burn-glow), transparent 70%); filter: blur(1px); animation: mt-flick 0.5s var(--e-io) infinite alternate; }
.mt-gauge[data-tool="liquidity"] .mt-gauge__fill, .mt-gauge[data-tool="water"] .mt-gauge__fill { background: linear-gradient(180deg, var(--water-glow), var(--water) 55%, var(--water-deep)); }
.mt-gauge[data-tool="liquidity"] .mt-gauge__fill::before, .mt-gauge[data-tool="water"] .mt-gauge__fill::before { content: ""; position: absolute; inset: -2px -30px -2px auto; width: 60px; background: radial-gradient(14px 6px at 50% 35%, oklch(1 0 0 / 0.55), transparent 70%); animation: mt-slosh 1.6s var(--e-io) infinite alternate; }
.mt-gauge[data-tool="stocks"] .mt-gauge__fill { background: repeating-linear-gradient(90deg, var(--stocks) 0 14px, var(--stocks-deep) 14px 16px); }
.mt-gauge[data-tool="holders"] .mt-gauge__fill { background: linear-gradient(90deg, var(--holders-deep), var(--holders)); }
@keyframes mt-flick { from { transform: scaleY(0.9) translateX(0); opacity: 0.8; } to { transform: scaleY(1.15) translateX(2px); opacity: 1; } }
@keyframes mt-slosh { from { transform: translateX(-6px); } to { transform: translateX(6px); } }

/* ── Steps (launch flow) ────────────────────────────────────────── */
.mt-steps { display: flex; gap: 0; counter-reset: step; }
.mt-step { position: relative; flex: 1; display: flex; flex-direction: column; gap: 8px; padding-right: 16px; }
.mt-step__dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-mono); font-size: var(--t-12); font-weight: 700; background: var(--paper); border: var(--bw) solid var(--line-2); color: var(--ink-3); position: relative; z-index: 1; transition: all var(--d-3) var(--e-out); }
.mt-step__dot svg { width: 13px; height: 13px; }
.mt-step::before { content: ""; position: absolute; top: 13px; left: 28px; right: 0; height: 2px; background: var(--line); }
.mt-step:last-child::before { display: none; }
.mt-step__name { font-weight: 700; font-size: var(--t-13); }
.mt-step__meta { font-size: var(--t-12); color: var(--ink-3); }
.mt-step.is-done .mt-step__dot { background: var(--g-500); border-color: var(--g-900); color: var(--g-950); }
.mt-step.is-done::before { background: var(--g-500); }
.mt-step.is-current .mt-step__dot { border-color: var(--g-600); color: var(--g-900); box-shadow: 0 0 0 4px var(--g-100); }
.mt-step.is-current .mt-step__name { color: var(--g-900); }
.mt-step.is-error .mt-step__dot { background: var(--burn-soft); border-color: var(--burn); color: var(--burn-ink); }
@media (max-width: 720px) { .mt-steps { flex-direction: column; gap: 12px; } .mt-step::before { display: none; } .mt-step { flex-direction: row; align-items: center; } }

/* ── Tabs ───────────────────────────────────────────────────────── */
.mt-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.mt-tab { position: relative; padding: 10px 14px; border: 0; background: none; color: var(--ink-3); font-weight: 600; font-size: var(--t-15); white-space: nowrap; flex: none; border-radius: var(--r-sm) var(--r-sm) 0 0; transition: color var(--d-2) var(--e-out), background var(--d-2) var(--e-out); }
.mt-tab:hover { color: var(--ink); background: var(--paper-2); }
.mt-tab[aria-selected="true"] { color: var(--ink); }
.mt-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2.5px; border-radius: 2px; background: var(--g-500); animation: mt-tab-in var(--d-3) var(--e-out-x); }
.mt-tab .mt-tab__n { margin-left: 6px; font-family: var(--font-mono); font-size: var(--t-12); color: var(--ink-4); }
@keyframes mt-tab-in { from { transform: scaleX(0.4); opacity: 0; } }

/* ── Table ──────────────────────────────────────────────────────── */
.mt-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); }
.mt-table { width: 100%; border-collapse: collapse; font-size: var(--t-13); }
.mt-table th { text-align: left; font-size: var(--t-12); font-weight: 600; color: var(--ink-3); letter-spacing: 0.01em; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--paper-2); white-space: nowrap; }
.mt-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.mt-table tr:last-child td { border-bottom: 0; }
.mt-table tbody tr { transition: background var(--d-1) var(--e-out); }
.mt-table tbody tr:hover { background: var(--paper-2); }
.mt-table .num { font-family: var(--font-mono); font-variation-settings: "wdth" 90; font-variant-numeric: tabular-nums; text-align: right; }
.mt-table th.num { text-align: right; }
.mt-table .dim { color: var(--ink-3); }

/* ── Console (the only dark surface: a material, not a theme) ──── */
.mt-console {
  background: oklch(0.17 0.03 185); color: oklch(0.90 0.07 160);
  border-radius: var(--r-md); padding: 14px 16px; min-height: 96px;
  font-family: var(--font-mono); font-variation-settings: "wdth" var(--wdth-mono); font-size: var(--t-12); line-height: 1.55;
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.06), inset 0 1px 0 oklch(1 0 0 / 0.08);
  overflow: auto; white-space: pre-wrap; word-break: break-word;
}
.mt-console__line { display: flex; gap: 10px; animation: mt-line-in var(--d-3) var(--e-out-5); }
.mt-console__t { color: var(--g-700); flex: none; }
.mt-console .ok { color: var(--g-400); }
.mt-console .err { color: oklch(0.78 0.16 35); }
.mt-console .warn { color: var(--stocks); }
.mt-console .dim { color: var(--g-700); }
.mt-console__cursor { display: inline-block; width: 7px; height: 12px; background: var(--g-400); vertical-align: -2px; animation: mt-blink 1s steps(1) infinite; }
@keyframes mt-line-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes mt-blink { 50% { opacity: 0; } }

/* ── Toast ──────────────────────────────────────────────────────── */
.mt-toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; pointer-events: none; width: min(92vw, 440px); }
.mt-toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 12px;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--gloss), var(--sh-2);
  font-size: var(--t-13); font-weight: 600; color: var(--ink); position: relative; overflow: hidden;
  animation: mt-toast-in var(--d-3) var(--e-out-x);
}
.mt-toast.is-leaving { animation: mt-toast-out calc(var(--d-3) * 0.75) var(--e-in) forwards; }
.mt-toast__icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--g-100); color: var(--g-900); }
.mt-toast__icon svg { width: 13px; height: 13px; }
.mt-toast--error .mt-toast__icon { background: var(--burn-soft); color: var(--burn-ink); }
.mt-toast--info .mt-toast__icon { background: var(--water-soft); color: var(--water-ink); }
.mt-toast--pending .mt-toast__icon { background: var(--amber-soft); color: var(--amber-ink); }
.mt-toast__body { flex: 1; min-width: 0; }
.mt-toast__body small { display: block; color: var(--ink-3); font-weight: 500; margin-top: 1px; }
.mt-toast__bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--g-500); transform-origin: left; animation: mt-toast-bar var(--toast-ms, 4000ms) linear forwards; }
.mt-toast--error .mt-toast__bar { background: var(--burn); }
.mt-toast--info .mt-toast__bar { background: var(--water); }
.mt-toast--pending .mt-toast__bar { background: var(--amber); animation: none; width: 40%; left: auto; right: 0; background: linear-gradient(90deg, transparent, var(--amber)); animation: mt-toast-indet 1.2s var(--e-io) infinite alternate; }
@keyframes mt-toast-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
@keyframes mt-toast-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }
@keyframes mt-toast-bar { to { transform: scaleX(0); } }
@keyframes mt-toast-indet { from { transform: translateX(-150%); } to { transform: translateX(0); } }

/* ── Skeleton / empty ───────────────────────────────────────────── */
.mt-skel { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--paper-3) 0%, var(--paper-4) 40%, var(--paper-3) 80%); background-size: 200% 100%; animation: mt-shimmer 1.4s linear infinite; }
.mt-skel--pill { height: 44px; border-radius: var(--r-pill); }
.mt-skel--block { height: 96px; border-radius: var(--r-md); }
@keyframes mt-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.mt-empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: var(--s-6) var(--s-4); color: var(--ink-2); border: 1.5px dashed var(--line-2); border-radius: var(--r-md); }
.mt-empty__art { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--tool-soft); color: var(--tool-ink); }
.mt-empty__art svg { width: 24px; height: 24px; }
.mt-empty b { color: var(--ink); font-weight: 700; }
.mt-empty small { color: var(--ink-3); max-width: 36ch; }

/* ── Tooltip ────────────────────────────────────────────────────── */
.mt-tip { position: relative; }
.mt-tip::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px);
  background: var(--g-950); color: var(--g-100); font-size: var(--t-12); font-weight: 500; line-height: 1.35; padding: 6px 9px; border-radius: var(--r-sm);
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity var(--d-2) var(--e-out), transform var(--d-2) var(--e-out); z-index: 10;
}
.mt-tip::before { content: ""; position: absolute; left: 50%; bottom: calc(100% + 3px); transform: translateX(-50%) rotate(45deg); width: 8px; height: 8px; background: var(--g-950); opacity: 0; transition: opacity var(--d-2) var(--e-out); pointer-events: none; }
.mt-tip:hover::after, .mt-tip:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.mt-tip:hover::before, .mt-tip:focus-visible::before { opacity: 1; }

/* ── Wallet pill ────────────────────────────────────────────────── */
.mt-wallet { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 6px; border-radius: var(--r-pill); background: var(--paper); border: var(--bw) solid var(--line-2); box-shadow: var(--gloss), var(--sh-1); font-family: var(--font-mono); font-variation-settings: "wdth" 90; font-size: var(--t-13); font-weight: 600; color: var(--ink); }
.mt-wallet__id { width: 26px; height: 26px; border-radius: 50%; background: conic-gradient(from 200deg, var(--holders), var(--g-500), var(--water), var(--holders)); box-shadow: var(--gloss); }
.mt-wallet__bal { color: var(--ink-3); font-weight: 500; }

/* ── Scene (ambient animation container) ───────────────────────── */
.mt-scene {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  background: linear-gradient(180deg, color-mix(in oklch, var(--tool-soft) 70%, var(--paper)), var(--tool-soft)); min-height: 220px; isolation: isolate; contain: layout paint; container: mt-scene / size;
  border: 1px solid color-mix(in oklch, var(--tool) 30%, var(--line));
}
.mt-scene canvas, .mt-scene svg.mt-scene__layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.mt-scene__label { position: absolute; left: 14px; top: 12px; z-index: 2; }
.mt-scene__caption { position: absolute; right: 12px; top: 12px; z-index: 2; font-family: var(--font-mono); font-variation-settings: "wdth" 90; font-size: var(--t-12); color: var(--tool-ink); background: color-mix(in oklch, var(--paper) 78%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: 4px 9px; border-radius: var(--r-pill); max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid color-mix(in oklch, var(--tool) 25%, transparent); }
.mt-scene--thumb .mt-scene__caption, .mt-scene__caption:empty { display: none; }
@container mt-scene (max-height: 190px) { .mt-scene__caption { display: none; } }
.mt-scene--band { min-height: 160px; border-radius: var(--r-lg) var(--r-lg) 0 0; border-bottom: 0; }
.mt-scene--thumb { min-height: 96px; border-radius: var(--r-md); }

/* ticker (stocks) */
.mt-ticker { position: absolute; left: 0; display: flex; gap: 10px; width: max-content; animation: mt-ticker var(--ticker-ms, 28s) linear infinite; will-change: transform; padding-left: 10px; }
.mt-scene[data-scene="stocks"] .mt-ticker { -webkit-mask: none; }
.mt-ticker__item:hover { box-shadow: var(--gloss), 0 0 0 2px var(--tool), 0 0 18px -4px var(--tool); transform: translateY(-2px); }
.mt-ticker:hover { animation-play-state: paused; }
.mt-ticker__item { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 5px; border-radius: var(--r-pill); background: var(--paper); border: 1px solid color-mix(in oklch, var(--tool) 35%, var(--line)); box-shadow: var(--gloss); transition: box-shadow var(--d-3) var(--e-out), transform var(--d-3) var(--e-out); font-family: var(--font-mono); font-variation-settings: "wdth" 95; font-size: var(--t-13); font-weight: 600; white-space: nowrap; }
.mt-ticker__logo { position: relative; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: color-mix(in oklch, var(--tool) 70%, var(--ink)); font-family: var(--font-ui); font-size: 10px; font-weight: 800; color: #fff; letter-spacing: -0.02em; flex: none; }
.mt-ticker__logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.mt-ticker__rank { font-style: normal; font-size: 10px; font-weight: 700; color: var(--tool-ink); opacity: .8; margin-right: -2px; }
/* asset tapes: 1-2 rows of riding pills, centered; sparkline behind when tall enough */
.mt-tapes { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); display: grid; gap: 10px; padding: 14px 0; -webkit-mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }   /* padding: the mask clips to the box — keeps the hover glow of a lifted pill uncut */
.mt-tapes--spark[data-rows="2"] { top: 44%; }
.mt-tape { position: relative; height: 36px; overflow: visible; }   /* the scene clips; keep the hover glow uncut */
.mt-tape .mt-ticker { top: 1px; }
.mt-ticker__chg { font-size: var(--t-12); font-weight: 700; }
.mt-ticker__chg.up { color: var(--g-800); } .mt-ticker__chg.down { color: var(--burn-ink); }
@keyframes mt-ticker { to { transform: translateX(-50%); } }

/* airdrop scene: people glyphs are SVG inside the scene layer; nothing needed here */

/* ── Reveal (brand entrances) ───────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--d-5) var(--e-out-5), transform var(--d-5) var(--e-out-5); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.is-in { opacity: 1; transform: none; }

/* ── Keyboard hint / kbd ────────────────────────────────────────── */
kbd.mt-kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--paper); border: 1px solid var(--line-2); box-shadow: 0 1px 0 var(--line-2); font-size: 11px; color: var(--ink-2); }

/* ── Burn embers (DOM spans spawned by the scene) ─────────────────── */
.mt-ember { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--burn-glow); box-shadow: 0 0 6px var(--burn-glow); pointer-events: none; animation: mt-ember 1.4s var(--e-out) forwards; }
@keyframes mt-ember { 0% { opacity: 0; transform: translate(0, 0) scale(0.6); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx, 0), var(--dy, -70px)) scale(0.4); } }

/* ── Theme toggle (segmented, icon-only) ─────────────────────────── */
.mt-theme { display: inline-flex; padding: 3px; gap: 2px; background: var(--paper-3); border: 1px solid var(--line); border-radius: var(--r-pill); }
.mt-theme button { width: 30px; height: 28px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-3); display: grid; place-items: center; transition: background var(--d-2) var(--e-out), color var(--d-2) var(--e-out), box-shadow var(--d-2) var(--e-out); }
.mt-theme button svg { width: 15px; height: 15px; }
.mt-theme button:hover { color: var(--ink); }
.mt-theme button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--gloss), var(--sh-1); }

/* ── Glass capsule: a wide pill-shaped glass card (landing tool cards) ─ */
.mt-capsule {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-4);
  padding: 22px 22px 22px 30px; border-radius: var(--r-pill);
  background: var(--glass); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3); backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
  border: 1px solid transparent; background-clip: padding-box;
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--sh-2), 0 0 48px -14px color-mix(in oklch, var(--tool) 70%, transparent);
  transition: transform var(--d-3) var(--e-out), box-shadow var(--d-3) var(--e-out);
}
.mt-capsule::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in oklch, var(--tool) 85%, white), color-mix(in oklch, var(--tool) 55%, transparent) 55%, color-mix(in oklch, var(--tool) 25%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.mt-capsule:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--glass-hi), var(--sh-2), 0 0 64px -10px color-mix(in oklch, var(--tool) 80%, transparent); }
.mt-capsule__kicker { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); font-size: var(--t-12); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tool-ink); background: var(--paper); padding: 2px 10px; border-radius: var(--r-pill); border: 1px solid color-mix(in oklch, var(--tool) 40%, transparent); }
.mt-capsule__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.mt-capsule__list li { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: var(--t-15); letter-spacing: -0.005em; }
.mt-capsule__list li svg { width: 16px; height: 16px; color: var(--tool); flex: none; }
.mt-capsule__list li.is-dim { color: var(--ink-3); font-weight: 600; }
.mt-capsule__list li.is-dim svg { color: var(--ink-4); }
.mt-capsule__go { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--tool); color: var(--tool-on); border: var(--bw) solid var(--tool-ink); box-shadow: var(--gloss), 0 0 24px -6px var(--tool); transition: transform var(--d-2) var(--e-out-x), box-shadow var(--d-2) var(--e-out); }
.mt-capsule__go svg { width: 24px; height: 24px; transition: transform var(--d-2) var(--e-out-x); }
.mt-capsule:hover .mt-capsule__go { transform: scale(1.06); }
.mt-capsule:hover .mt-capsule__go svg { transform: translateX(3px); }
.mt-capsule__icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--tool-soft); color: var(--tool-ink); border: 1px solid color-mix(in oklch, var(--tool) 40%, transparent); }
.mt-capsule__icon svg { width: 24px; height: 24px; }
.mt-capsule--lead { grid-template-columns: auto minmax(0, 1fr) auto; }
/* sparkles inside glass (decorative dots, brand only) */
.mt-sparkle { position: absolute; width: 6px; height: 6px; pointer-events: none; color: var(--tool-glow); animation: mt-sparkle 2.4s var(--e-io) infinite; opacity: 0; }
.mt-sparkle::before, .mt-sparkle::after { content: ""; position: absolute; inset: 0; background: currentColor; border-radius: 1px; }
.mt-sparkle::after { transform: rotate(45deg); }
@keyframes mt-sparkle { 0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); } 50% { opacity: 1; transform: scale(1) rotate(90deg); } }

/* ── Stocks scene: market green field ─ */
.mt-scene[data-scene="stocks"] .mt-ticker__item { border-color: var(--line-2); }
.mt-scene[data-scene="stocks"] .mt-ticker__item:hover { box-shadow: var(--gloss), 0 0 0 2px var(--tool), 0 0 18px -4px var(--tool); }

/* ── Split scene: two tools blended by weight (exact slanted seam) ──── */
.mt-scene--split { --mt-split: 50%; }
.mt-scene__half { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(180deg, color-mix(in oklch, var(--tool-soft) 70%, var(--paper)), var(--tool-soft)); container: mt-scene / size; }
.mt-scene__half .mt-scene__caption { display: none; }
.mt-scene__half--b { clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%); will-change: clip-path; }
.mt-scene__seam { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.mt-scene__label--b { left: auto; right: 14px; }
.mt-scene__pct { position: absolute; bottom: 12px; z-index: 3; font-family: var(--font-mono); font-variation-settings: "wdth" 92; font-size: var(--t-12); font-weight: 700; color: var(--tool-on); background: var(--tool); padding: 2px 8px; border-radius: var(--r-pill); box-shadow: var(--gloss); }
.mt-scene__pct--a { left: 14px; } .mt-scene__pct--b { right: 14px; }
@container mt-scene (max-height: 150px) { .mt-scene__pct { display: none; } }

/* ── Tool editor (1-2 tools + split) · .te ───────────────────────── */
.te { display: grid; gap: 14px; }
.te__params { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.te__params:empty { display: none; }
.te__note { grid-column: 1 / -1; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 16px; border-radius: var(--r-md); background: var(--tool-soft); border: 1px solid color-mix(in oklch, var(--tool) 40%, var(--line)); color: var(--ink); }
.te__note svg { width: 20px; height: 20px; color: var(--tool-ink); margin-top: 1px; }
.te__note b { display: block; font-size: var(--t-15); font-weight: 700; letter-spacing: -0.01em; color: var(--tool-ink); }
.te__note p { margin: 4px 0 0; font-size: var(--t-13); line-height: 1.5; color: var(--ink-2); max-width: 70ch; }
.te__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.te__slot { display: grid; gap: 12px; padding: 14px; border: 1px dashed var(--line-2); border-radius: var(--r-md); background: color-mix(in oklch, var(--paper-2) 60%, transparent); }
.te__slot-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.te__split { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--paper); }
.te__split-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.te__split-head b { font-family: var(--font-mono); font-variation-settings: "wdth" 95; font-size: var(--t-15); font-weight: 700; }
.te__split input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; margin: 0; }
.te__split input[type="range"]::-webkit-slider-runnable-track { height: 12px; border-radius: 99px; border: 1px solid var(--line-2); background: linear-gradient(90deg, var(--a) 0 calc(var(--pct) - 1.5%), var(--b) calc(var(--pct) + 1.5%) 100%); box-shadow: var(--gloss); }
.te__split input[type="range"]::-moz-range-track { height: 12px; border-radius: 99px; border: 1px solid var(--line-2); background: linear-gradient(90deg, var(--a) 0 calc(var(--pct) - 1.5%), var(--b) calc(var(--pct) + 1.5%) 100%); }
.te__split input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -8px; border-radius: 50%; background: var(--paper); border: var(--bw) solid var(--outline); box-shadow: var(--gloss), var(--sh-1); cursor: grab; }
.te__split input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--paper); border: var(--bw) solid var(--outline); box-shadow: var(--sh-1); cursor: grab; }
.te__split input[type="range"]:focus-visible { outline: 0; } .te__split input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: var(--ring); }
.te__ticks { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: var(--t-12); color: var(--ink-3); }
.mt-tool[aria-disabled="true"] { opacity: 0.38; pointer-events: none; }

/* ── Memes scene · real pump.fun coins drifting up ───────────────── */
.mt-scene__memes { position: absolute; inset: 0; overflow: hidden; }
.mt-meme { position: absolute; left: 0; top: 0; border-radius: 50%; overflow: hidden; background: var(--paper-3); border: 2px solid color-mix(in oklch, var(--paper) 85%, transparent); box-shadow: var(--sh-1), 0 0 0 1px color-mix(in oklch, var(--tool) 30%, transparent); will-change: transform; display: grid; place-items: center; font-weight: 800; font-size: 10px; letter-spacing: -0.02em; color: var(--tool-ink); transition: box-shadow var(--d-3) var(--e-out); }
.mt-meme img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mt-meme:hover { box-shadow: 0 0 0 2px var(--tool), 0 0 24px -2px var(--tool); z-index: 2; }

/* ── Asset picker · .ap (stocks / RWA / memes, with logos) ───────── */
.ap { display: grid; gap: 10px; grid-column: 1 / -1; min-width: 0; }
.ap__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ap__head .mt-label { display: inline-flex; align-items: center; gap: 8px; }
.ap__search { flex: 1; min-width: 160px; max-width: 300px; }
.ap__search .mt-input { height: 38px; padding: 0 12px; border-radius: var(--r-pill); }
.ap__sel { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px 10px 10px; border-radius: var(--r-md); background: var(--tool-soft); border: 1px solid color-mix(in oklch, var(--tool) 45%, transparent); box-shadow: var(--gloss); }
.ap__sel .ap__logo { width: 48px; height: 48px; font-size: 14px; }
.ap__sel-name { min-width: 0; }
.ap__sel-name b { display: block; font-family: var(--font-mono); font-variation-settings: "wdth" 95; font-size: var(--t-15); font-weight: 700; color: var(--tool-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap__sel-name span { display: block; font-size: var(--t-12); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap__sel-meta { text-align: right; font-family: var(--font-mono); font-variation-settings: "wdth" 92; font-size: var(--t-13); font-weight: 700; color: var(--ink); white-space: nowrap; }
.ap__sel-meta small { display: block; font-size: var(--t-12); font-weight: 600; color: var(--ink-3); }
.ap__scroll { position: relative; }
.ap__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 340px; overflow-y: auto; padding: 3px 3px 30px; scrollbar-width: thin; scroll-padding-bottom: 30px; }
.ap__scroll::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30px; pointer-events: none; background: linear-gradient(180deg, transparent, var(--paper-2)); border-radius: 0 0 var(--r-md) var(--r-md); }
.ap__item { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px 8px 8px; border-radius: 14px; border: var(--bw) solid var(--line-2); background: var(--paper); color: var(--ink); text-align: left; cursor: pointer; box-shadow: var(--gloss); min-width: 0; transition: border-color var(--d-2) var(--e-out), background var(--d-2) var(--e-out), transform var(--d-1) var(--e-out), box-shadow var(--d-2) var(--e-out); }
.ap__item:hover { border-color: color-mix(in oklch, var(--tool) 55%, var(--line-2)); background: color-mix(in oklch, var(--tool-soft) 55%, var(--paper)); transform: translateY(-1px); }
.ap__item:active { transform: scale(0.985); }
.ap__item:focus-visible { outline: 0; box-shadow: var(--gloss), var(--ring); }
.ap__item[aria-checked="true"] { background: var(--tool-soft); border-color: var(--tool); box-shadow: var(--gloss), 0 0 0 1px var(--tool), 0 0 24px -8px color-mix(in oklch, var(--tool) 60%, transparent); }
.ap__logo { width: 38px; height: 38px; border-radius: 50%; background: var(--paper-3); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; font-family: var(--font-mono); font-weight: 800; font-size: 11px; letter-spacing: -0.02em; color: var(--ink-2); flex: none; }
.ap__logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap__txt { min-width: 0; display: grid; gap: 2px; }
.ap__sym { font-family: var(--font-mono); font-variation-settings: "wdth" 92; font-weight: 700; font-size: var(--t-13); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap__name { font-size: var(--t-12); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap__meta { display: flex; gap: 6px; align-items: baseline; font-size: var(--t-12); color: var(--ink-3); white-space: nowrap; font-family: var(--font-mono); font-variation-settings: "wdth" 90; font-variant-numeric: tabular-nums; }
.ap__meta .up { color: var(--stocks-ink); font-weight: 700; } .ap__meta .down { color: var(--burn-ink); font-weight: 700; }
.ap__rank { position: absolute; top: -6px; left: -6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--tool); color: var(--tool-on); font-family: var(--font-mono); font-size: 10px; font-weight: 700; display: grid; place-items: center; box-shadow: var(--gloss); }
.ap__check { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--tool); color: var(--tool-on); display: none; place-items: center; box-shadow: var(--gloss); }
.ap__check svg { width: 11px; height: 11px; }
.ap__item[aria-checked="true"] .ap__check { display: grid; }
.ap__empty { grid-column: 1 / -1; padding: 22px; text-align: center; color: var(--ink-3); font-size: var(--t-13); }
.ap__foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: var(--t-12); color: var(--ink-3); }
@media (max-width: 640px) { .ap__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 300px; } .ap__sel { grid-template-columns: 40px minmax(0, 1fr); } .ap__sel-meta { display: none; } }
@media (max-width: 430px) { .ap__grid { grid-template-columns: minmax(0, 1fr); } }
.ap__logo { position: relative; }
.ap__logo img { position: absolute; inset: 0; }
.mt-chip--sm { height: 20px; padding: 0 7px; font-size: 10px; }
/* tool grid follows its container: 5 → 3 → 2 columns */
.te, .te__slot, .mt-panel { container-type: inline-size; }
@container (max-width: 760px) { .mt-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 460px) { .mt-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* category tabs inside the Assets tool (stocks / rwa / memes) */
.mt-segmented--cats { flex-wrap: wrap; }
.mt-segmented--cats > button svg { width: 14px; height: 14px; }
.mt-segmented--cats > button[aria-pressed="true"] { color: var(--tool-ink); background: var(--tool-soft); box-shadow: var(--gloss), 0 0 0 1px color-mix(in oklch, var(--tool) 55%, transparent); }
.mt-segmented--cats > button:disabled { opacity: .4; cursor: not-allowed; }
/* lottery wheel scene */
.mt-wheel { position: absolute; inset: 0; width: 100%; height: 100%; }
.mt-wheel__wedge { transition: filter var(--d-3) var(--e-out); }
.mt-wheel__wedge.is-win { filter: brightness(1.18) saturate(1.15); }
/* tool editor · cycle */
.te__cycle { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--paper); }
.te__cycle-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.te__cycle .mt-segmented { flex-wrap: wrap; align-items: center; }
.te__cycle-custom { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px 0 10px; height: 34px; border-radius: var(--r-pill); background: var(--paper); border: 1px solid var(--line-2); font-size: var(--t-13); color: var(--ink-3); }
.te__cycle-custom input { width: 64px; border: 0; outline: 0; background: transparent; font-family: var(--font-mono); font-size: var(--t-13); font-weight: 700; color: var(--ink); -moz-appearance: textfield; }
.te__cycle-custom input::-webkit-outer-spin-button, .te__cycle-custom input::-webkit-inner-spin-button { -webkit-appearance: none; }
