:root {
  color-scheme: light;
  --ink: #0b0c0c;
  --ink-2: #292a28;
  --muted: #74766f;
  --paper: #e9eae3;
  --paper-2: #dfe2dc;
  --glass: rgba(255, 255, 255, 0.38);
  --glass-strong: rgba(255, 255, 255, 0.62);
  --glass-dark: rgba(17, 18, 17, 0.92);
  --line: rgba(10, 12, 11, 0.11);
  --line-light: rgba(255, 255, 255, 0.82);
  --mint: #7fe7c5;
  --violet: #8b7cff;
  --coral: #ff7667;
  --acid: #d9f85e;
  --blue: #79bfff;
  --spectrum: linear-gradient(120deg, #76e3cd 0%, #8d83ff 45%, #ff7768 100%);
  --select-aurora: linear-gradient(135deg, rgba(112,94,232,.94) 0%, rgba(106,121,236,.9) 48%, rgba(68,190,188,.88) 100%);
  --select-teal: linear-gradient(135deg, rgba(62,173,177,.94) 0%, rgba(82,192,183,.9) 54%, rgba(128,206,212,.88) 100%);
  --select-shadow: 0 10px 24px rgba(91,82,200,.24), 0 4px 12px rgba(66,184,184,.16), inset 0 1px 0 rgba(255,255,255,.52);
  --shadow-sm: 0 16px 36px rgba(19, 22, 20, 0.11), inset 0 1px 0 rgba(255,255,255,.72), inset 0 -1px 0 rgba(255,255,255,.16);
  --shadow-lg: 0 32px 86px rgba(18, 21, 19, 0.22), inset 0 1px 0 rgba(255,255,255,.78);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --safe-bottom: max(14px, env(safe-area-inset-bottom));
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 22%, rgba(126, 231, 197, .12), transparent 24%),
    radial-gradient(circle at 78% 76%, rgba(141, 124, 255, .14), transparent 28%),
    #101211;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; }
button, [tabindex] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, [tabindex]:focus-visible { outline: 2px dashed var(--ink); outline-offset: 3px; }
button { cursor: pointer; }

.stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 520px) 390px;
  align-items: center;
  justify-content: center;
  gap: clamp(54px, 8vw, 132px);
  padding: 42px;
}

.prototype-note { color: #f3f4ef; max-width: 500px; }
.note-symbol { display: flex; gap: 4px; align-items: end; width: 24px; height: 30px; margin-bottom: 36px; }
.note-symbol span { width: 4px; border-radius: 4px; background: var(--spectrum); }
.note-symbol span:nth-child(1) { height: 8px; }
.note-symbol span:nth-child(2) { height: 17px; }
.note-symbol span:nth-child(3) { height: 25px; }
.note-symbol span:nth-child(4) { height: 13px; }
.eyebrow { margin: 0 0 18px; color: rgba(255,255,255,.55); font-size: 11px; font-weight: 750; letter-spacing: .2em; }
.prototype-note h1 { margin: 0; font-size: clamp(52px, 5.2vw, 76px); line-height: .93; letter-spacing: -.065em; }
.note-cn { margin: 26px 0 8px; font-size: 22px; font-weight: 670; }
.note-copy { max-width: 470px; margin: 0; color: rgba(255,255,255,.58); font-size: 14px; line-height: 1.8; }
.palette-row { display: flex; gap: 8px; margin: 28px 0; }
.palette-row i { width: 36px; height: 8px; border-radius: 999px; }
.palette-row i:nth-child(1) { background: #f1f1eb; }
.palette-row i:nth-child(2) { background: #111; }
.palette-row i:nth-child(3) { background: var(--mint); }
.palette-row i:nth-child(4) { background: var(--violet); }
.palette-row i:nth-child(5) { background: var(--coral); }
.note-actions { padding: 0; margin: 0; list-style: none; border-top: 1px solid rgba(255,255,255,.14); }
.note-actions li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.68); font-size: 13px; }
.note-actions b { color: #9c91ff; font-size: 10px; letter-spacing: .12em; }

.phone {
  position: relative;
  width: 390px;
  height: 844px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 48px;
  background:
    radial-gradient(circle at 82% 14%, rgba(141,124,255,.18), transparent 28%),
    radial-gradient(circle at 8% 72%, rgba(127,231,197,.17), transparent 30%),
    linear-gradient(145deg, #f0f1eb, var(--paper));
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 52px 110px rgba(0,0,0,.46), 0 0 0 10px #171918, 0 0 0 11px rgba(255,255,255,.16);
}

.phone::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.46);
}

.hardware-rail { position: absolute; z-index: 80; left: -12px; width: 5px; border-radius: 4px 0 0 4px; background: #343635; }
.rail-1 { top: 112px; height: 28px; }
.rail-2 { top: 166px; height: 52px; }
.rail-3 { top: 232px; height: 52px; }
.rail-4 { left: auto; right: -12px; top: 178px; height: 78px; border-radius: 0 4px 4px 0; }
.dynamic-island { position: absolute; top: 11px; left: 50%; z-index: 85; width: 118px; height: 34px; padding: 0; transform: translateX(-50%); overflow: hidden; border: 0; border-radius: 22px; background: #050505; color: white; box-shadow: 0 8px 20px rgba(0,0,0,.18); transition: width 420ms var(--ease), height 420ms var(--ease), border-radius 420ms var(--ease), box-shadow 220ms; }
.dynamic-island.is-expanded { width: calc(100% - 32px); max-width: 346px; height: 88px; border-radius: 27px; box-shadow: 0 18px 42px rgba(0,0,0,.28); }
.island-compact { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 7px; opacity: 1; transition: opacity 120ms ease; }
.island-compact i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(127,231,197,.12); }
.island-compact b { font-size: 10px; font-weight: 640; letter-spacing: .05em; }
.island-expanded { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; opacity: 0; transform: translateY(7px); transition: opacity 180ms 80ms ease, transform 340ms var(--ease); }
.dynamic-island.is-expanded .island-compact { opacity: 0; }
.dynamic-island.is-expanded .island-expanded { opacity: 1; transform: none; }
.phone.is-quick-open .dynamic-island { pointer-events: none; }
.island-expanded span { min-width: 0; text-align: left; }
.island-expanded small { display: block; color: rgba(255,255,255,.62); font-size: 10px; line-height: 1.2; }
.island-expanded strong { display: block; margin-top: 5px; overflow: hidden; font-size: 21px; line-height: 1; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.island-expanded em { flex: 0 0 auto; max-width: 116px; color: rgba(255,255,255,.74); font-size: 11px; font-style: normal; line-height: 1.3; text-align: right; }
.status-bar { position: absolute; z-index: 65; top: 0; left: 0; width: 100%; height: 52px; padding: 17px 20px 0; display: flex; justify-content: space-between; align-items: flex-start; font-size: 12px; font-weight: 760; pointer-events: none; }
.status-icons { display: flex; align-items: center; gap: 5px; }
.status-icons svg { width: 17px; height: 11px; fill: currentColor; }

.ambient-spectrum {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: paint;
  background:
    radial-gradient(circle at 76% 10%, rgba(160,143,255,.2), transparent 34%),
    radial-gradient(circle at 6% 77%, rgba(87,219,194,.18), transparent 38%),
    linear-gradient(148deg, rgba(255,255,255,.08), transparent 44%, rgba(121,191,255,.06));
  opacity: 1;
  filter: none;
}
.ambient-spectrum::before {
  content: "";
  position: absolute;
  inset: -24%;
  background: conic-gradient(from 45deg at 54% 48%, rgba(126,231,197,.19), rgba(121,191,255,.08), rgba(139,124,255,.22), rgba(255,118,103,.1), rgba(126,231,197,.19));
  filter: blur(38px);
  opacity: .86;
  transform-origin: 52% 46%;
  animation: ambient-veil 28s ease-in-out infinite alternate;
  will-change: transform, opacity;
}
.ambient-spectrum::after {
  content: "";
  position: absolute;
  inset: -12%;
  background:
    linear-gradient(112deg, transparent 14%, rgba(255,255,255,.3) 38%, rgba(255,255,255,.035) 52%, transparent 70%),
    radial-gradient(ellipse at 72% 24%, rgba(255,255,255,.32), transparent 17%);
  mix-blend-mode: overlay;
  opacity: .54;
  animation: ambient-sheen 19s ease-in-out infinite alternate;
  will-change: transform, opacity;
}
.ambient-spectrum i {
  --view-x: 0px;
  --view-y: 0px;
  --view-scale: 1;
  --view-rotate: 0deg;
  position: absolute;
  display: block;
  filter: blur(9px) saturate(136%) contrast(106%);
  opacity: var(--blob-opacity, .44);
  transform: translate3d(calc(var(--view-x) + var(--ambient-x, 0px)), calc(var(--view-y) + var(--ambient-y, 0px) + var(--ambient-scroll, 0px)), 0) scale(var(--view-scale)) rotate(var(--view-rotate));
  transform-origin: center;
  transition: transform 820ms var(--ease), opacity 620ms ease, filter 620ms ease;
  will-change: transform, opacity;
}
.ambient-spectrum i b {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 46% 54% 62% 38% / 54% 42% 58% 46%;
  box-shadow:
    inset 24px 20px 52px rgba(255,255,255,.34),
    inset -34px -32px 58px rgba(28,21,82,.2),
    0 28px 68px rgba(87,76,174,.18);
  transform-origin: 48% 52%;
  will-change: transform;
}
.ambient-spectrum i b::before,
.ambient-spectrum i b::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.ambient-spectrum i b::before {
  inset: 3%;
  border-radius: inherit;
  background:
    radial-gradient(circle at 28% 20%, rgba(255,255,255,.9) 0 3%, rgba(255,255,255,.34) 5%, transparent 20%),
    radial-gradient(ellipse at 66% 72%, transparent 32%, rgba(27,17,77,.2) 58%, transparent 74%),
    linear-gradient(132deg, rgba(255,255,255,.26), transparent 36% 68%, rgba(255,255,255,.18));
  mix-blend-mode: screen;
  opacity: .82;
  animation: ambient-specular 6.8s ease-in-out infinite alternate;
}
.ambient-spectrum i b::after {
  inset: -18%;
  border-radius: 43% 57% 39% 61%;
  background: conic-gradient(from 18deg, transparent 0 18%, rgba(255,255,255,.28) 27%, transparent 37% 62%, rgba(9,18,53,.13) 73%, transparent 86%);
  mix-blend-mode: overlay;
  opacity: .66;
  animation: ambient-caustic 9.6s linear infinite;
}
.ambient-spectrum i:nth-child(1) { width: 300px; height: 300px; top: 28px; right: -88px; --blob-opacity: .72; }
.ambient-spectrum i:nth-child(1) b { background: radial-gradient(circle at 28% 20%, #d8d0ff 0 7%, transparent 27%), conic-gradient(from 145deg, #6652e8, #a899ff 38%, #48c8d3 69%, #7968f4); animation: ambient-drift-one 12.5s ease-in-out infinite alternate; }
.ambient-spectrum i:nth-child(2) { width: 288px; height: 288px; left: -108px; bottom: 42px; --blob-opacity: .66; }
.ambient-spectrum i:nth-child(2) b { background: radial-gradient(circle at 30% 23%, #d7fff6 0 6%, transparent 25%), conic-gradient(from 130deg, #43bea8, #72dce1 43%, #8777ed 72%, #54d0b5); animation: ambient-drift-two 14s ease-in-out -5s infinite alternate; }
.ambient-spectrum i:nth-child(3) { width: 232px; height: 232px; right: -20px; bottom: -56px; --blob-opacity: .54; }
.ambient-spectrum i:nth-child(3) b { background: radial-gradient(circle at 28% 22%, #fff9d8 0 6%, transparent 24%), conic-gradient(from 120deg, #f16f70, #f0dc62 39%, #65ceb8 68%, #ed7a9d); animation: ambient-drift-three 15.5s ease-in-out -9s infinite alternate; }
.ambient-spectrum i:nth-child(4) { width: 210px; height: 210px; left: 29%; top: 39%; --blob-opacity: .46; }
.ambient-spectrum i:nth-child(4) b { background: radial-gradient(circle at 29% 21%, #e7fbff 0 6%, transparent 23%), conic-gradient(from 132deg, #55c9dc, #7560e7 42%, #f482a6 74%, #65d2cf); animation: ambient-drift-four 10.8s ease-in-out -3s infinite alternate; }

.phone[data-active-view="flow"] .ambient-spectrum i:nth-child(1) { --view-x: -28px; --view-y: 34px; --view-scale: .98; --view-rotate: 4deg; }
.phone[data-active-view="flow"] .ambient-spectrum i:nth-child(2) { --view-x: 24px; --view-y: -28px; --view-scale: 1.03; --view-rotate: -3deg; }
.phone[data-active-view="flow"] .ambient-spectrum i:nth-child(3) { --view-x: -18px; --view-y: -12px; --view-scale: 1.02; }
.phone[data-active-view="flow"] .ambient-spectrum i:nth-child(4) { --view-x: 20px; --view-y: 30px; --view-scale: 1.01; }

.phone[data-active-view="close"] .ambient-spectrum i:nth-child(1) { --view-x: -18px; --view-y: 42px; --view-scale: 1.02; --view-rotate: 4deg; }
.phone[data-active-view="close"] .ambient-spectrum i:nth-child(2) { --view-x: 20px; --view-y: -16px; --view-scale: .99; }
.phone[data-active-view="close"] .ambient-spectrum i:nth-child(3) { --view-x: -12px; --view-y: -38px; --view-scale: 1.05; --view-rotate: -5deg; }
.phone[data-active-view="close"] .ambient-spectrum i:nth-child(4) { --view-x: -20px; --view-y: 12px; --view-scale: .98; }

.phone[data-active-view="future"] .ambient-spectrum i:nth-child(1) { --view-x: -20px; --view-y: 30px; --view-scale: 1.03; --view-rotate: -3deg; }
.phone[data-active-view="future"] .ambient-spectrum i:nth-child(2) { --view-x: 26px; --view-y: -34px; --view-scale: 1.04; }
.phone[data-active-view="future"] .ambient-spectrum i:nth-child(3) { --view-x: -18px; --view-y: -20px; --view-scale: .99; }
.phone[data-active-view="future"] .ambient-spectrum i:nth-child(4) { --view-x: 16px; --view-y: -24px; --view-scale: 1.04; --view-rotate: 5deg; }

.phone.is-ambient-paused .ambient-spectrum *, .phone.is-ambient-paused .ambient-spectrum::before, .phone.is-ambient-paused .ambient-spectrum::after { animation-play-state: paused !important; }

.app-main { position: absolute; inset: 0; z-index: 2; overflow: hidden; isolation: isolate; }
.view {
  position: absolute;
  inset: 0;
  padding: 56px 20px 112px;
  overflow: hidden auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  opacity: 1;
  visibility: visible;
  transform: none;
  filter: none;
}
.view::-webkit-scrollbar { display: none; }
.view.is-active { opacity: 1; visibility: visible; transform: none; filter: none; }

.brandbar, .page-header { height: 45px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.brand-lockup { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0; border: 0; background: none; font-weight: 760; font-size: 18px; }
.brand-lockup small, .screen-heading > span { color: var(--muted); font-size: 10px; font-weight: 720; letter-spacing: .1em; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 7px); gap: 3px; }
.brand-mark i { width: 7px; height: 7px; border-radius: 50%; }
.brand-mark i:nth-child(1) { background: var(--coral); }
.brand-mark i:nth-child(2) { background: var(--acid); }
.brand-mark i:nth-child(3) { background: var(--blue); }
.brand-mark i:nth-child(4) { background: var(--violet); }
.profile-orb, .round-control, .quick-dismiss, .detail-header button {
  display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.86); border-radius: 50%; background: linear-gradient(145deg, rgba(255,255,255,.66), rgba(255,255,255,.24)); box-shadow: var(--shadow-sm); backdrop-filter: blur(28px) saturate(175%); font-weight: 720;
}

.screen-heading { display: flex; align-items: baseline; gap: 11px; }
.screen-heading h2 { margin: 0; font-size: 36px; line-height: 1; letter-spacing: -.055em; font-weight: 760; }
.page-header .screen-heading h2 { font-size: 35px; }
.page-actions { display: flex; align-items: center; gap: 7px; }
.page-actions .round-control { width: 42px; height: 42px; }

.scope-switch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 52px;
  margin: 9px 0 12px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.54), rgba(255,255,255,.16));
  box-shadow: 0 10px 28px rgba(18,20,18,.08), inset 0 1px 0 rgba(255,255,255,.88);
  backdrop-filter: blur(30px) saturate(180%);
}
.scope-switch button { position: relative; z-index: 2; min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.scope-switch button small { display: block; margin-top: 2px; font-size: 10px; letter-spacing: .05em; }
.scope-switch button.is-selected { color: white; }
.scope-cursor { position: absolute; z-index: 1; left: 4px; top: 4px; width: calc((100% - 8px) / 4); height: 44px; border-radius: 22px; background: var(--select-aurora); box-shadow: var(--select-shadow); backdrop-filter: blur(18px) saturate(175%); transition: transform 430ms var(--ease); }

.period-toolbar { display: grid; grid-template-columns: 42px minmax(0,1fr) 42px 64px; align-items: center; min-height: 48px; margin: -4px 1px 10px; overflow: hidden; border-top: 1px solid rgba(21,22,22,.09); border-bottom: 1px solid rgba(21,22,22,.09); }
.period-toolbar button { min-height: 44px; border: 0; background: transparent; }
.period-arrow { color: #303132; font-size: 18px; }
.period-arrow:disabled { opacity: .2; }
.period-current { min-width: 0; padding: 4px 8px; text-align: left; }
.period-current strong, .period-current small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.period-current strong { font-size: 13px; letter-spacing: -.01em; }
.period-current small { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 650; }
.period-current small.is-positive { color: #087b5e; }
.period-current small.is-negative { color: #c44943; }
.period-custom { align-self: center; min-height: 32px !important; margin-right: 2px; border: 1px solid rgba(22,22,25,.1) !important; border-radius: 16px; color: #4e4c56; background: rgba(255,255,255,.34) !important; font-size: 10px; font-weight: 740; }
.period-custom.is-active { color: white; border-color: transparent !important; background: var(--select-aurora) !important; }

.liquid-glass, .pulse-panel, .close-summary, .future-ribbon, .future-workbench, .ledger-scroll {
  position: relative;
  border: 1px solid var(--line-light);
  background:
    linear-gradient(140deg, rgba(255,255,255,.64) 0%, rgba(255,255,255,.27) 54%, rgba(255,255,255,.13) 100%),
    var(--glass);
  box-shadow: var(--shadow-sm), inset 1px 0 0 rgba(255,255,255,.28);
  backdrop-filter: blur(38px) saturate(185%) contrast(104%);
}
.hero-content-layer { position: relative; z-index: 1; min-width: 0; }
.hero-content-layer > *, .pulse-summary-row > *, .pulse-metrics > *, .flow-summary .hero-content-layer > *, .source-grid > *, .future-workbench-head > *, .future-comparison > *, .detail-header > * { min-width: 0; }

/* Pulse */
.pulse-panel { min-height: 392px; overflow: hidden; border-radius: var(--radius-xl); }
.pulse-panel::before {
  content: ""; position: absolute; width: 260px; height: 220px; right: -110px; top: -105px; border-radius: 50%; background: conic-gradient(from 20deg, var(--coral), var(--violet), var(--mint), var(--coral)); filter: blur(30px); opacity: .46; pointer-events: none;
}
.pulse-summary-row { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,.92fr); min-height: 126px; border-bottom: 1px solid var(--line); }
.pulse-summary, .pulse-amount { padding: 20px 17px 18px; }
.pulse-summary { min-width: 0; overflow: hidden; text-align: left; border: 0; border-right: 1px solid var(--line); background: transparent; }
.pulse-summary > span, .pulse-amount > span { display: block; max-width: 100%; overflow: hidden; font-size: 13px; font-weight: 730; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.pulse-summary > span small, .pulse-amount > small, .pulse-amount b { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .05em; }
.core-rate { display: block; max-width: 100%; margin-top: 6px; overflow: hidden; font-size: 52px; line-height: .9; letter-spacing: -.07em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.core-rate small { font-size: 17px; letter-spacing: -.02em; }
.pulse-summary i { display: inline-block; margin-top: 11px; color: var(--muted); font-size: 10px; font-style: normal; font-weight: 680; letter-spacing: .04em; }
.pulse-amount { display: flex; min-width: 0; overflow: hidden; flex-direction: column; align-items: flex-start; justify-content: center; }
.core-amount { display: block; max-width: 100%; margin: 8px 0 0; overflow: hidden; font-size: 28px; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wave-heading { display: flex; justify-content: space-between; align-items: end; padding: 13px 15px 8px; }
.wave-heading > * { min-width: 0; }
.wave-heading span { display: block; font-size: 12px; font-weight: 790; font-variant-numeric: tabular-nums; }
.wave-heading small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .05em; }
.wave-heading p { max-width: 66%; margin: 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.wave-heading b { color: var(--ink); font-size: 13px; }
.wave-stage { position: relative; height: 132px; margin: 0 13px; overflow: hidden; border: 1px solid rgba(9,11,10,.09); border-radius: 22px; background: rgba(255,255,255,.45); touch-action: none; }
.wave-stage::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(to right, rgba(10,12,11,.045) 1px, transparent 1px), linear-gradient(to bottom, rgba(10,12,11,.035) 1px, transparent 1px); background-size: 28px 100%, 100% 33px; }
.wave-stage::after { content: ""; position: absolute; inset: 0; opacity: 0; background: radial-gradient(circle at var(--wave-light-x, 50%) 60%, rgba(141,124,255,.22), transparent 30%); transition: opacity 180ms; }
.wave-stage.is-scrubbing::after { opacity: 1; }
.cash-wave { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wave-zero { stroke: rgba(10,12,11,.12); stroke-dasharray: 3 5; }
.pulse-wave-area { fill: url(#wave-fill); }
.pulse-wave-line { fill: none; stroke: url(#wave-stroke); stroke-width: 3.2; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 4px 6px rgba(79,91,142,.18)); }
.wave-cursor { --cursor-y: 50%; position: absolute; z-index: 3; top: var(--cursor-y); left: 50%; transform: translate(-50%,-50%); pointer-events: none; transition: left 140ms var(--ease), top 140ms var(--ease); }
.wave-cursor::before { content: ""; position: absolute; left: 50%; top: -92px; width: 1px; height: 184px; background: linear-gradient(transparent, rgba(10,12,11,.35), transparent); }
.wave-cursor i { position: relative; display: block; width: 14px; height: 14px; border: 4px solid white; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 2px var(--violet), 0 8px 20px rgba(85,72,180,.38); }
.wave-cursor span { position: absolute; right: 14px; top: -15px; min-width: 64px; max-width: 112px; padding: 8px 10px; overflow: hidden; border-radius: 14px 14px 4px 14px; color: white; background: var(--ink); font-size: 11px; font-weight: 720; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.wave-cursor:not(.is-right-edge) span { left: 14px; right: auto; border-radius: 14px 14px 14px 4px; }
.pulse-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 12px; border-top: 1px solid var(--line); }
.pulse-metrics button { min-width: 0; min-height: 74px; padding: 13px; overflow: hidden; text-align: left; border: 0; border-right: 1px solid var(--line); background: transparent; }
.pulse-metrics button:last-child { border-right: 0; }
.pulse-metrics span { font-size: 13px; font-weight: 680; }
.pulse-metrics small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.pulse-metrics strong { display: block; max-width: 100%; margin-top: 9px; overflow: hidden; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pulse-metrics button:nth-child(1) strong { color: #078060; }
.pulse-metrics button:nth-child(2) strong { color: #d3493c; }
.insight-row { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 66px; margin-top: 14px; padding: 12px 4px; text-align: left; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.insight-row span { display: block; min-width: 0; max-width: calc(100% - 52px); }
.insight-row small { display: block; color: var(--muted); font-size: 10px; letter-spacing: .05em; }
.insight-row b { display: -webkit-box; margin-top: 4px; overflow: hidden; overflow-wrap: anywhere; font-size: 14px; line-height: 1.4; font-weight: 650; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.insight-row i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: white; font-style: normal; }

/* Flow */
.flow-summary { min-height: 130px; margin-top: 12px; border-radius: var(--radius-xl); overflow: hidden; }
.flow-summary .hero-content-layer { display: grid; grid-template-columns: minmax(0,1.22fr) minmax(0,.78fr); min-height: 130px; }
.flow-summary::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 5px; border-radius: 0 6px 6px 0; background: var(--spectrum); }
.flow-summary .hero-content-layer > div:first-child { padding: 23px 18px 18px 22px; }
.flow-summary span { display: block; font-size: 12px; font-weight: 720; }
.flow-summary small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .05em; }
.flow-summary .hero-content-layer > div:first-child strong { display: block; max-width: 100%; margin-top: 12px; overflow: hidden; font-size: 34px; letter-spacing: -.055em; white-space: nowrap; }
.flow-split { display: grid; align-content: center; padding: 14px; border-left: 1px solid var(--line); }
.flow-split p { margin: 0; padding: 8px 0; }
.flow-split p + p { border-top: 1px solid var(--line); }
.flow-split b { display: block; max-width: 100%; margin-top: 3px; overflow: hidden; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.flow-overview { position: relative; display: grid; grid-template-columns: repeat(3,1fr); height: 52px; margin: 10px 0; padding: 4px; border: 1px solid rgba(255,255,255,.82); border-radius: 24px; background: linear-gradient(145deg, rgba(255,255,255,.5), rgba(255,255,255,.14)); box-shadow: 0 10px 26px rgba(18,20,18,.07), inset 0 1px 0 rgba(255,255,255,.82); backdrop-filter: blur(28px) saturate(175%); }
.flow-overview button { min-height: 44px; border: 0; border-radius: 20px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 680; }
.flow-overview button small { margin-left: 4px; font-size: 10px; }
.flow-overview button.is-active { color: white; background: var(--select-aurora); box-shadow: var(--select-shadow); }
.ledger-scroll { height: calc(100% - 245px); min-height: 410px; overflow: auto; border-radius: 26px; }
.river-head { position: sticky; top: 0; z-index: 4; display: flex; justify-content: space-between; padding: 15px 16px 13px; border-bottom: 1px solid var(--line); background: rgba(242,243,238,.82); backdrop-filter: blur(18px); color: var(--muted); font-size: 10px; letter-spacing: .05em; }
.river-head b { color: var(--ink); font-size: 11px; }
.ledger-group header { display: flex; justify-content: space-between; padding: 14px 14px 8px; }
.ledger-group header strong { font-size: 13px; }
.ledger-group header span { color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.ledger-group.is-empty { display: none; }
.ledger-row { margin: 0 10px; border-top: 1px solid rgba(10,12,11,.08); transition: opacity 180ms, transform 300ms var(--ease); }
.ledger-row.is-filtered { display: none; }
.node-card { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 12px; align-items: center; width: 100%; min-height: 76px; padding: 10px 3px; text-align: left; border: 0; background: transparent; }
.ledger-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 14px; background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.82); box-shadow: 0 5px 14px rgba(20,22,20,.07); font-size: 12px; font-weight: 760; }
.ledger-row.income .ledger-icon { background: rgba(127,231,197,.4); }
.ledger-copy strong, .ledger-value strong { display: block; overflow: hidden; font-size: 14px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.ledger-copy { min-width: 0; }
.ledger-copy small, .ledger-value small { display: block; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.ledger-value { min-width: 0; max-width: 104px; text-align: right; }
.ledger-row.income .ledger-value strong { color: #087b5e; }
.node-detail { display: none; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 2px 4px 14px 58px; color: var(--muted); font-size: 12px; }
.node-detail b { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.node-detail button { min-height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.64); font-size: 12px; font-weight: 680; }
.ledger-row.is-open .node-detail { display: grid; animation: reveal-detail 340ms var(--ease); }
@keyframes reveal-detail { from { opacity: 0; transform: translateY(-9px); } }

/* Month close */
.close-stage-stack { display: grid; position: relative; }
.close-stage-stack > section { grid-area: 1 / 1; min-width: 0; transform-origin: center bottom; }
.phone.is-close-transitioning .close-stage-stack, .phone.is-close-transitioning .app-dock { pointer-events: none; }
.close-badge { display: inline-flex; align-items: center; min-height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.62); color: var(--muted); font-size: 10px; font-weight: 680; letter-spacing: .04em; }
.close-summary { margin-top: 14px; padding: 22px; border-radius: var(--radius-xl); overflow: hidden; }
.close-summary::before { content: ""; position: absolute; width: 200px; height: 150px; right: -80px; top: -70px; border-radius: 50%; background: var(--coral); filter: blur(36px); opacity: .2; }
.close-summary-copy { position: relative; }
.close-summary-copy > small { color: var(--muted); font-size: 10px; font-weight: 680; letter-spacing: .06em; }
.close-summary-copy h3 { margin: 10px 0 0; font-size: 25px; letter-spacing: -.045em; }
.close-summary-copy h3 strong { font-size: 34px; }
.close-summary-copy p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.recon-ledger { position: relative; margin: 24px 0 22px; padding: 18px 0 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.recon-count { display: flex; min-width: 0; align-items: baseline; gap: 7px; overflow: hidden; }
.recon-count strong { min-width: 0; overflow: hidden; font-size: 64px; line-height: .84; letter-spacing: -.075em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.recon-count span { color: var(--muted); font-size: 21px; font-weight: 680; }
.recon-ledger p { margin: 12px 0; font-size: 14px; font-weight: 680; }
.recon-ledger p small { margin-left: 5px; color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.recon-track { height: 8px; border-radius: 8px; background: rgba(10,12,11,.08); overflow: hidden; }
.recon-track i { display: block; width: 98.5%; height: 100%; border-radius: inherit; background: var(--spectrum); animation: fill-track 900ms var(--ease) both; }
@keyframes fill-track { from { width: 0; } }
.source-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.source-grid > div { min-width: 0; padding: 0 12px; overflow: hidden; border-right: 1px solid var(--line); }
.source-grid > div:first-child { padding-left: 0; }
.source-grid > div:last-child { border: 0; }
.source-grid span { display: block; overflow: hidden; font-size: 13px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.source-grid small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.source-grid strong { display: block; margin-top: 8px; font-size: 20px; }
.review-callout { display: flex; align-items: center; justify-content: space-between; min-height: 66px; margin-top: 11px; padding: 11px 4px; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.review-callout strong { display: block; font-size: 14px; }
.review-callout span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.review-count { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--coral); color: var(--ink) !important; font-size: 15px !important; font-weight: 800; }
.primary-action, .secondary-action, .save-quick, .detail-action { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 54px; margin-top: 13px; padding: 0 18px; border: 0; border-radius: 21px; background: var(--ink); color: white; font-size: 14px; font-weight: 680; }
.primary-action span, .detail-action span { font-size: 10px; letter-spacing: .04em; }
.is-hidden { display: none !important; }
.close-metrics { display: grid; grid-template-columns: repeat(3,1fr); margin: 14px 0 12px; border: 1px solid rgba(255,255,255,.86); border-radius: 22px; background: linear-gradient(145deg, rgba(255,255,255,.54), rgba(255,255,255,.16)); box-shadow: var(--shadow-sm); backdrop-filter: blur(30px) saturate(180%); }
.close-metrics div { padding: 13px; border-right: 1px solid var(--line); }
.close-metrics div:last-child { border: 0; }
.close-metrics span { display: block; color: var(--muted); font-size: 10px; letter-spacing: .03em; }
.close-metrics strong { display: block; margin-top: 5px; font-size: 18px; }
.decision-stage { position: relative; height: 418px; touch-action: none; }
.deck-card { position: absolute; left: 50%; top: 50%; width: calc(100% - 20px); height: 348px; border: 1px solid var(--line-light); border-radius: var(--radius-xl); background: rgba(255,255,255,.8); box-shadow: var(--shadow-lg); backdrop-filter: blur(28px); }
.deck-back { pointer-events: none; }
.back-two { transform: translate(-50%,-50%) translateY(18px) scale(.91); opacity: .28; }
.back-one { transform: translate(-50%,-50%) translateY(10px) scale(.96); opacity: .54; }
.deck-front { display: flex; flex-direction: column; padding: 22px; transform: translate(-50%,-50%); transition: transform 340ms var(--ease), opacity 260ms; }
.deck-front.is-dragging { transition: none; }
.card-source { display: flex; min-width: 0; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.card-source > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-merchant { margin: auto 0; }
.card-merchant > span { display: inline-flex; min-height: 30px; align-items: center; padding: 0 11px; border-radius: 15px; background: rgba(255,118,103,.19); font-size: 11px; font-weight: 680; }
.card-merchant h3 { display: -webkit-box; margin: 13px 0 8px; overflow: hidden; overflow-wrap: anywhere; font-size: 25px; line-height: 1.15; letter-spacing: -.045em; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card-merchant strong { display: block; max-width: 100%; overflow: hidden; font-size: 40px; letter-spacing: -.055em; white-space: nowrap; }
.card-reason { padding-top: 15px; border-top: 1px solid var(--line); }
.card-reason small { color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.card-reason p { display: -webkit-box; margin: 8px 0 0; overflow: hidden; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.card-grip { display: flex; justify-content: center; gap: 4px; margin-top: 16px; }
.card-grip i { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }
.decision-label { position: absolute; z-index: -1; padding: 9px 11px; border-radius: 14px; color: var(--muted); font-size: 10px; font-weight: 680; letter-spacing: .03em; }
.label-left { left: 0; top: 45%; }
.label-right { right: 0; top: 45%; }
.label-down { left: 50%; bottom: 0; transform: translateX(-50%); }
.decision-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.decision-actions button { min-height: 52px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.62); }
.decision-actions span { font-size: 16px; }
.decision-actions small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.decision-actions .is-primary { background: var(--ink); color: white; }
.decision-actions .is-primary small { color: rgba(255,255,255,.62); }
.swipe-left { transform: translate(-50%,-50%) translateX(-420px) rotate(-12deg); opacity: 0; }
.swipe-right { transform: translate(-50%,-50%) translateX(420px) rotate(12deg); opacity: 0; }
.swipe-down { transform: translate(-50%,-50%) translateY(450px) scale(.86); opacity: 0; }
.close-result { min-height: 600px; margin-top: 14px; padding: 36px 24px; text-align: center; border: 1px solid var(--line-light); border-radius: var(--radius-xl); background: linear-gradient(140deg, rgba(255,255,255,.64) 0%, rgba(255,255,255,.27) 54%, rgba(255,255,255,.13) 100%), var(--glass); box-shadow: var(--shadow-sm), inset 1px 0 0 rgba(255,255,255,.28); backdrop-filter: blur(38px) saturate(185%) contrast(104%); }
.result-seal { width: 156px; height: 156px; margin: 36px auto; display: flex; flex-direction: column; justify-content: center; border-radius: 48px; background: var(--ink); color: white; box-shadow: 0 22px 50px rgba(0,0,0,.2); transform: rotate(-3deg); }
.result-seal span, .result-seal small { color: rgba(255,255,255,.62); font-size: 10px; letter-spacing: .06em; }
.result-seal strong { margin: 8px 0; font-size: 33px; }
.close-result .hero-content-layer > p { color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.close-result .hero-content-layer > h3 { max-width: 100%; margin: 12px 0 24px; overflow: hidden; font-size: 50px; letter-spacing: -.06em; white-space: nowrap; }
.result-equation { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); justify-content: center; gap: 10px; font-size: 13px; }
.result-equation span { min-width: 0; overflow: hidden; white-space: nowrap; }
.result-equation i { color: var(--muted); }
.secondary-action { justify-content: center; margin-top: 38px; }

/* Future */
.future-presets { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; margin: 15px 0 13px; padding: 4px; border: 1px solid rgba(255,255,255,.82); border-radius: 24px; background: linear-gradient(145deg, rgba(255,255,255,.52), rgba(255,255,255,.16)); box-shadow: 0 10px 28px rgba(18,20,18,.08), inset 0 1px 0 rgba(255,255,255,.86); backdrop-filter: blur(30px) saturate(180%); }
.future-presets button { width: 100%; height: 54px; min-width: 0; padding: 7px 5px; border: 0; border-radius: 20px; background: transparent; box-shadow: none; color: var(--muted); transition: background 220ms ease, color 180ms ease, box-shadow 220ms ease; }
.future-presets button span { display: block; font-size: 13px; font-weight: 680; }
.future-presets button small { display: block; margin-top: 3px; font-size: 10px; letter-spacing: .04em; }
.future-presets button.is-selected { color: white; background: var(--select-aurora); border-color: rgba(255,255,255,.68); box-shadow: var(--select-shadow); }
.future-workbench { overflow: hidden; min-height: 332px; padding: 20px; border-radius: var(--radius-xl); touch-action: pan-y; transform: scaleX(var(--jelly-scale-x,1)) scaleY(var(--jelly-scale-y,1)); transition: transform 280ms var(--ease); }
.future-workbench::before { content: ""; position: absolute; width: 220px; height: 170px; right: -90px; top: -80px; border-radius: 44% 56% 62% 38%; background: conic-gradient(from 40deg, var(--mint), var(--violet), var(--coral), var(--mint)); filter: blur(34px); opacity: .34; pointer-events: none; }
.future-workbench-head { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.future-workbench-head small { color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .05em; }
.future-workbench-head h3 { width: 235px; min-height: 27px; margin: 5px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 22px; letter-spacing: -.035em; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 11px; border: 1px solid rgba(255,255,255,.7); border-radius: 17px; background: rgba(255,255,255,.32); color: var(--muted); font-size: 10px; backdrop-filter: blur(16px); }
.live-badge i { width: 6px; height: 6px; border-radius: 50%; background: #078060; box-shadow: 0 0 0 4px rgba(127,231,197,.25); }
.future-total-block { position: relative; z-index: 1; min-height: 92px; margin-top: 18px; }
.future-total-block p { margin: 0; color: var(--muted); font-size: 13px; }
.future-total-block p span { color: var(--ink); font-weight: 780; }
.future-total-block > strong { display: block; max-width: 100%; margin-top: 4px; overflow: hidden; font-size: 43px; line-height: 1; letter-spacing: -.065em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.future-total-block > small { display: block; width: 100%; min-height: 18px; margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.future-comparison { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); min-height: 64px; margin: 13px 0 0; overflow: hidden; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.future-comparison > div { min-width: 0; padding: 10px 10px 9px; border-left: 1px solid var(--line); }
.future-comparison > div:first-child { border-left: 0; }
.future-comparison span, .future-comparison small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.future-comparison span { font-size: 11px; font-weight: 700; }
.future-comparison small { margin-top: 2px; color: var(--muted); font-size: 10px; letter-spacing: .035em; }
.future-comparison strong { display: block; max-width: 100%; margin-top: 6px; overflow: hidden; font-size: 14px; line-height: 1; color: #087f68; font-variant-numeric: tabular-nums; white-space: nowrap; }
.future-comparison strong.is-negative { color: #e94a49; }
.future-projection { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(12,1fr); align-items: end; gap: 5px; height: 72px; margin: 13px 0 0; padding: 10px 4px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.future-projection i { min-height: 7px; height: var(--projection-height); border-radius: 5px 5px 2px 2px; background: rgba(11,12,12,.2); transform-origin: bottom; transition: height 320ms var(--ease), background 180ms; }
.future-projection i.is-pressure { background: var(--coral); }
.future-projection i.is-strong { background: var(--ink); }
.future-projection-axis { position: relative; z-index: 1; display: flex; justify-content: space-between; margin: 5px 6px 0; color: var(--muted); font-size: 10px; font-weight: 650; }
.future-controls { margin-top: 14px; padding: 17px 18px 16px; border-radius: var(--radius-xl); }
.future-controls-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.future-controls-head span { display: block; font-size: 15px; font-weight: 720; }
.future-controls-head small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; letter-spacing: .05em; }
.future-controls-head button { min-height: 44px; padding: 0 14px; border: 1px solid rgba(255,255,255,.72); border-radius: 18px; background: rgba(255,255,255,.26); color: var(--muted); font-size: 11px; font-weight: 680; }
.scenario-editor { position: relative; z-index: 1; }
.scenario-control { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 5px 14px; min-height: 68px; padding: 12px 0 10px; border-bottom: 1px solid var(--line); }
.scenario-control > span b { display: block; font-size: 14px; }
.scenario-control > span small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.scenario-control output { min-width: 0; max-width: 126px; overflow: hidden; text-align: right; font-size: 14px; font-weight: 780; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scenario-control input[type="range"] { grid-column: 1 / -1; width: 100%; height: 44px; margin: -13px 0; appearance: none; background: transparent; cursor: pointer; }
.scenario-control input[type="range"]::-webkit-slider-runnable-track { height: 5px; border-radius: 8px; background: linear-gradient(90deg, rgba(111,100,229,.96) 0 var(--range-progress,50%), rgba(71,181,189,.17) var(--range-progress,50%) 100%); }
.scenario-control input[type="range"]::-webkit-slider-thumb { width: 18px; height: 18px; margin-top: -6.5px; appearance: none; border: 4px solid white; border-radius: 50%; background: linear-gradient(135deg, #7568e7, #49b7bc); box-shadow: 0 4px 12px rgba(91,82,200,.28), 0 0 0 1px rgba(255,255,255,.38); }
.scenario-control input[type="range"]::-moz-range-track { height: 5px; border: 0; border-radius: 8px; background: rgba(11,12,12,.1); }
.scenario-control input[type="range"]::-moz-range-progress { height: 5px; border-radius: 8px; background: linear-gradient(90deg, #7568e7, #49b7bc); }
.scenario-control input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 4px solid white; border-radius: 50%; background: linear-gradient(135deg, #7568e7, #49b7bc); box-shadow: 0 4px 12px rgba(91,82,200,.28); }
.future-horizon { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; }
.future-horizon > span { font-size: 14px; font-weight: 680; }
.future-horizon > span small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.future-horizon > div { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; padding: 3px; border: 1px solid rgba(255,255,255,.72); border-radius: 18px; background: rgba(255,255,255,.26); }
.future-horizon button { min-width: 52px; min-height: 44px; border: 0; border-radius: 16px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 680; }
.future-horizon button.is-selected { color: white; background: var(--select-teal); box-shadow: 0 5px 14px rgba(57,157,168,.2); }
.future-statement { min-height: 90px; margin-top: 14px; padding: 15px 4px; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.future-statement > small { color: var(--muted); font-size: 10px; font-weight: 680; letter-spacing: .05em; }
.future-statement h3 { min-height: 48px; margin: 8px 0 0; font-size: 18px; line-height: 1.32; letter-spacing: -.025em; }
.future-statement strong { text-decoration: underline 3px var(--violet); text-underline-offset: 4px; }
.future-ribbon { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-radius: 24px; overflow: hidden; }
.future-ribbon > div { position: relative; min-width: 0; height: 88px; padding: 13px 14px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.future-ribbon > div:nth-child(-n+2) { border-top: 0; }
.future-ribbon > div:nth-child(odd) { border-left: 0; }
.future-ribbon span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 680; }
.future-ribbon small { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; letter-spacing: .035em; }
.future-ribbon strong { display: block; max-width: 100%; margin-top: 10px; overflow: hidden; white-space: nowrap; font-size: 18px; font-variant-numeric: tabular-nums; }
.future-ribbon > p { grid-column: 1 / -1; min-height: 57px; margin: 0; padding: 13px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.45; }
.future-ribbon b { color: var(--ink); }
.future-save-route { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; margin-top: 14px; padding: 0 18px; border: 0; border-radius: 21px; background: var(--ink); color: white; box-shadow: 0 14px 30px rgba(0,0,0,.17); }
.future-save-route span { font-size: 14px; font-weight: 680; }
.future-save-route small { color: rgba(255,255,255,.64); font-size: 10px; letter-spacing: .04em; }
.future-save-route.is-saved { color: var(--ink); background: linear-gradient(120deg, var(--mint), #b8f0df); }
.future-save-route.is-saved small { color: rgba(11,12,12,.55); }

/* Shared dock */
.app-dock { position: absolute; z-index: 30; left: 14px; right: 14px; bottom: calc(10px + env(safe-area-inset-bottom)); height: 70px; display: grid; grid-template-columns: 1fr 1fr 62px 1fr 1fr; align-items: center; padding: 6px; border: 1px solid rgba(255,255,255,.82); border-radius: 28px; background: linear-gradient(145deg, rgba(255,255,255,.62), rgba(255,255,255,.24)); box-shadow: 0 18px 38px rgba(18,20,18,.15), inset 0 1px 0 rgba(255,255,255,.88); backdrop-filter: blur(38px) saturate(180%); }
.app-dock > button { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 56px; border: 0; border-radius: 20px; background: transparent; color: var(--muted); }
.app-dock svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; }
.app-dock small { margin-top: 4px; font-size: 10px; font-weight: 620; }
.app-dock > button.is-active { color: white; }
.dock-liquid { position: absolute; z-index: 1; top: 7px; height: 54px; border-radius: 19px; background: var(--select-aurora); box-shadow: var(--select-shadow); transform-origin: left center; will-change: transform; }
.app-dock > button svg, .app-dock > button small { transform-origin: center; will-change: transform, opacity; }
.app-dock .quick-trigger { align-self: center; justify-self: center; width: 52px; height: 52px; border-radius: 50%; color: white; background: var(--select-aurora); box-shadow: var(--select-shadow); }
.quick-trigger::before { content: ""; position: absolute; inset: 2px; z-index: -1; border-radius: inherit; background: var(--spectrum); filter: blur(12px); opacity: .28; }
.quick-trigger span { font-size: 25px; font-weight: 300; line-height: 1; transition: transform 260ms var(--ease); }
.quick-trigger:active span { transform: rotate(90deg) scale(.82); }

/* Living sheet overlays */
.object-detail {
  position: absolute; z-index: 50; inset: 0; padding: 50px 20px 26px; overflow: hidden auto; background: linear-gradient(145deg, rgba(244,245,239,.72), rgba(226,229,222,.55)); backdrop-filter: blur(52px) saturate(190%); opacity: 0; visibility: hidden; transform: translateY(72%) scale(.78); transform-origin: 50% 92%; border-radius: 44px; transition: opacity 180ms ease, transform 520ms var(--ease), border-radius 520ms var(--ease), visibility 0s linear 520ms;
}
.object-detail::before { content: ""; position: absolute; z-index: -1; width: 300px; height: 300px; right: -100px; top: -100px; border-radius: 46% 54% 62% 38%; background: var(--spectrum); filter: blur(38px); opacity: .48; }
.object-detail.is-open { opacity: 1; visibility: visible; transform: none; border-radius: 0; transition-delay: 0s; }

.quick-space {
  position: absolute; z-index: 50; inset: 0; overflow: hidden; color: var(--ink);
  background: rgba(235,238,233,.12); visibility: hidden; opacity: 1; pointer-events: none; isolation: isolate;
}
.quick-space::before {
  content: ""; position: absolute; z-index: 0; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(236,238,234,.16), rgba(221,224,220,.36));
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.quick-sheet {
  position: absolute; z-index: 2; inset: 58px 14px 12px; padding: 18px; overflow: hidden auto; color: var(--ink);
  border: 1px solid rgba(255,255,255,.86); border-radius: 36px;
  background:
    radial-gradient(circle at 88% 8%, rgba(139,124,255,.25), transparent 28%),
    radial-gradient(circle at 8% 46%, rgba(77,210,188,.2), transparent 34%),
    radial-gradient(circle at 84% 86%, rgba(255,155,122,.14), transparent 32%),
    linear-gradient(145deg, rgba(249,250,247,.86), rgba(232,235,239,.68) 58%, rgba(238,236,231,.72));
  -webkit-backdrop-filter: blur(48px) saturate(188%) contrast(103%);
  backdrop-filter: blur(48px) saturate(188%) contrast(103%);
  box-shadow: 0 32px 80px rgba(29,31,47,.22), inset 0 1px 0 rgba(255,255,255,.96), inset 0 -1px 0 rgba(255,255,255,.36);
  clip-path: polygon(0 102%,100% 102%,100% 100%,0 100%);
  -webkit-clip-path: polygon(0 102%,100% 102%,100% 100%,0 100%);
  will-change: clip-path; isolation: isolate;
}
.quick-sheet::before {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: linear-gradient(118deg, transparent 0 28%, rgba(255,255,255,.34) 41%, transparent 55% 100%); opacity: .72;
}
.quick-space.is-open { visibility: visible; }
.quick-space.is-open ~ .home-indicator { background: #0a0a0a; }
.quick-space .quick-dismiss, .quick-space .quick-heading, .quick-space .quick-type-switch, .quick-space .quick-amount-panel, .quick-space .quick-section-head, .quick-space .quick-category-grid, .quick-space .number-pad, .quick-space .save-quick { opacity: 0; transform: translate3d(0,24px,0); will-change: transform, opacity; }
.quick-header { display: flex; align-items: flex-start; justify-content: space-between; min-height: 66px; }
.quick-dismiss { position: relative; z-index: 4; flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255,255,255,.86); border-radius: 50%; background: rgba(255,255,255,.47); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 24px rgba(35,38,58,.1); }
.quick-dismiss:focus-visible { outline: 2px solid rgba(92,78,210,.5); outline-offset: 2px; }
.quick-heading { margin-top: 1px; padding-right: 18px; }
.quick-heading span, .detail-header span { color: var(--muted); font-size: 10px; font-weight: 680; letter-spacing: .07em; }
.quick-heading h2, .detail-header h2 { margin: 4px 0 0; font-size: 32px; line-height: 1; letter-spacing: -.055em; }
.quick-type-switch { position: relative; display: grid; grid-template-columns: 1fr 1fr; height: 48px; margin-top: 5px; padding: 4px; border: 1px solid rgba(255,255,255,.88); border-radius: 22px; background: rgba(255,255,255,.36); box-shadow: inset 0 1px 0 rgba(255,255,255,.88), 0 10px 26px rgba(34,37,55,.08); backdrop-filter: blur(28px) saturate(175%); }
.quick-type-switch button { position: relative; z-index: 2; min-height: 36px; border: 0; border-radius: 16px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 680; transition: color 180ms; }
.quick-type-switch button small { margin-left: 5px; font-size: 10px; letter-spacing: .04em; }
.quick-type-switch button.is-selected { color: white; }
.quick-type-switch > i { position: absolute; z-index: 1; top: 4px; left: 4px; width: calc((100% - 8px)/2); height: 38px; border-radius: 18px; background: var(--select-aurora); box-shadow: var(--select-shadow); backdrop-filter: blur(16px) saturate(180%); transition: transform 320ms var(--ease), background 180ms; }
.quick-space[data-entry-type="income"] .quick-type-switch > i { transform: translateX(100%); background: var(--select-teal); }
.quick-amount-panel { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 91px; margin-top: 12px; padding: 15px 18px; overflow: hidden; border: 1px solid rgba(255,255,255,.9); border-radius: 24px; background: linear-gradient(145deg, rgba(255,255,255,.62), rgba(255,255,255,.25)); box-shadow: 0 14px 32px rgba(28,31,47,.09), inset 0 1px 0 rgba(255,255,255,.92); backdrop-filter: blur(32px) saturate(176%); }
.quick-amount-panel::after { content: ""; position: absolute; right: -34px; top: -42px; width: 120px; height: 120px; border-radius: 50%; background: var(--spectrum); filter: blur(26px); opacity: .22; }
.quick-amount-panel span { position: relative; z-index: 1; max-width: 100%; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.quick-amount-panel strong { position: relative; z-index: 1; display: block; width: calc(100% - 92px); max-width: 100%; margin-top: 4px; overflow: hidden; font-size: 40px; line-height: 1; letter-spacing: -.055em; white-space: nowrap; }
.quick-amount-panel small { position: absolute; z-index: 1; right: 20px; bottom: 19px; color: var(--muted); font-size: 10px; }
.quick-section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 14px 2px 8px; }
.quick-section-head span { font-size: 14px; font-weight: 680; }
.quick-section-head small { color: var(--muted); font-size: 10px; letter-spacing: .05em; }
.quick-category-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; }
.quick-category-grid > button { --category-glass: linear-gradient(145deg, rgba(255,255,255,.58), rgba(255,255,255,.22)); --category-active: var(--select-aurora); grid-column: span 2; display: grid; grid-template-columns: 30px minmax(0,1fr); grid-template-rows: auto auto; align-items: center; min-width: 0; min-height: 54px; padding: 7px 10px; overflow: hidden; text-align: left; border: 1px solid rgba(255,255,255,.88); border-radius: 18px; background: var(--category-glass); box-shadow: 0 8px 20px rgba(18,20,18,.07), inset 0 1px 0 rgba(255,255,255,.76); backdrop-filter: blur(24px) saturate(180%); transition: transform 220ms var(--ease), background 150ms, color 150ms; }
.quick-category-grid > button:nth-child(1) { --category-glass: linear-gradient(145deg, rgba(126,231,197,.34), rgba(255,255,255,.28)); --category-active: linear-gradient(135deg, rgba(84,199,168,.88), rgba(124,217,203,.78)); }
.quick-category-grid > button:nth-child(2) { --category-glass: linear-gradient(145deg, rgba(141,124,255,.32), rgba(255,255,255,.28)); --category-active: linear-gradient(135deg, rgba(123,104,235,.88), rgba(154,136,246,.78)); }
.quick-category-grid > button:nth-child(3) { --category-glass: linear-gradient(145deg, rgba(121,191,255,.34), rgba(255,255,255,.28)); --category-active: linear-gradient(135deg, rgba(91,167,231,.88), rgba(126,198,239,.78)); }
.quick-category-grid > button:nth-child(4) { --category-glass: linear-gradient(145deg, rgba(255,118,103,.27), rgba(255,255,255,.3)); --category-active: linear-gradient(135deg, rgba(241,116,111,.84), rgba(241,154,132,.76)); }
.quick-category-grid > button:nth-child(5) { --category-glass: linear-gradient(145deg, rgba(217,248,94,.3), rgba(127,231,197,.2)); --category-active: linear-gradient(135deg, rgba(160,207,105,.84), rgba(91,192,160,.76)); }
.quick-category-grid > button:nth-child(4) { grid-column: 2 / span 2; }
.quick-category-grid > button span { grid-row: 1 / 3; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 10px; background: rgba(11,12,12,.07); font-size: 14px; font-weight: 720; }
.quick-category-grid > button b { align-self: end; min-width: 0; overflow: hidden; font-size: 13px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.quick-category-grid > button small { align-self: start; min-width: 0; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1; letter-spacing: .03em; text-overflow: ellipsis; white-space: nowrap; }
.quick-category-grid > button.is-selected { background: var(--category-active); color: white; box-shadow: 0 10px 24px rgba(79,94,170,.18), inset 0 1px 0 rgba(255,255,255,.46); transform: translateY(-2px); }
.quick-category-grid > button.is-selected span { background: rgba(255,255,255,.15); }
.quick-category-grid > button.is-selected small { color: rgba(255,255,255,.64); }
.number-pad { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin-top: 12px; }
.number-pad button { min-height: 44px; border: 1px solid rgba(255,255,255,.86); border-radius: 16px; background: rgba(255,255,255,.34); box-shadow: inset 0 1px 0 rgba(255,255,255,.75); backdrop-filter: blur(18px); font-size: 17px; font-weight: 560; }
.quick-space[data-entry-type="income"] .save-quick { background: #087b5e; }
.save-quick { min-height: 52px; margin: 12px 0 max(6px, env(safe-area-inset-bottom)); border-radius: 20px; }
.save-quick:disabled { opacity: .25; cursor: not-allowed; }

.object-detail { --detail-color: var(--violet); padding-top: 58px; transform-origin: var(--portal-x,50%) var(--portal-y,50%); transform: scale(.08); }
.object-detail::before { background: var(--detail-color); opacity: .42; }
.detail-header { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 12px; }
.detail-header > div { min-width: 0; }
.detail-header h2 { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-hero { margin-top: 26px; padding: 22px; border: 1px solid rgba(255,255,255,.9); border-radius: var(--radius-xl); background: linear-gradient(145deg, rgba(255,255,255,.6), rgba(255,255,255,.2)); box-shadow: var(--shadow-sm); backdrop-filter: blur(38px) saturate(185%); }
.detail-stat { display: flex; align-items: baseline; gap: 12px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.detail-stat span { min-width: 0; max-width: 72%; overflow: hidden; font-size: 64px; line-height: .9; letter-spacing: -.075em; white-space: nowrap; }
.detail-stat small { color: var(--muted); font-size: 13px; }
.detail-hero > strong { display: block; max-width: 100%; margin-top: 20px; overflow: hidden; font-size: 42px; letter-spacing: -.06em; white-space: nowrap; }
.detail-hero > p { margin: 9px 0 0; overflow-wrap: anywhere; color: var(--muted); font-size: 14px; line-height: 1.45; }
.detail-chart-head { display: flex; min-width: 0; justify-content: space-between; gap: 12px; margin-top: 30px; font-size: 11px; font-weight: 680; letter-spacing: .04em; }
.detail-chart-head strong { min-width: 0; max-width: 58%; overflow: hidden; letter-spacing: 0; white-space: nowrap; }
.detail-bars { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; align-items: end; height: 170px; padding: 18px 8px 0; border-bottom: 1px solid var(--line); }
.detail-bars button { position: relative; height: var(--h); min-height: 44px; border: 0; border-radius: 13px 13px 3px 3px; background: rgba(10,12,11,.15); transform-origin: bottom; transition: height 500ms var(--ease), transform 240ms var(--ease), background 200ms; }
.detail-bars button.is-selected { background: var(--select-aurora); transform: scaleX(1.08); }
.detail-bars button.is-selected::after { content: ""; position: absolute; inset: -4px; z-index: -1; border-radius: 16px 16px 5px 5px; background: var(--detail-color); filter: blur(8px); opacity: .5; }
.detail-periods { display: grid; grid-template-columns: repeat(6,1fr); padding: 10px 8px; color: var(--muted); font-size: 11px; text-align: center; }
.detail-periods b { color: var(--ink); }
.detail-action { margin-top: 18px; }

/* Data workspace · operational ledger */
.workspace-space { position: absolute; inset: 0; z-index: 92; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity 180ms ease, visibility 0s linear 180ms; }
.workspace-space.is-open { visibility: visible; opacity: 1; pointer-events: auto; transition-delay: 0s; }
.workspace-space::before { content: ""; position: absolute; inset: 0; background: rgba(232,234,228,.48); backdrop-filter: blur(11px) saturate(130%); }
.workspace-sheet { position: absolute; inset: 48px 10px 10px; overflow: hidden; border: 1px solid rgba(255,255,255,.86); border-radius: 32px; background: linear-gradient(145deg, rgba(250,250,247,.9), rgba(238,241,237,.78)); box-shadow: 0 34px 82px rgba(18,21,19,.25), inset 0 1px 0 rgba(255,255,255,.92); backdrop-filter: blur(46px) saturate(165%); transform: translateY(18px) scale(.985); transition: transform 360ms var(--ease); }
.workspace-space.is-open .workspace-sheet { transform: none; }
.workspace-header { height: 70px; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 8px 18px; border-bottom: 1px solid var(--line); }
.workspace-header span, .transaction-editor header span { color: var(--muted); font-size: 10px; font-weight: 720; letter-spacing: .08em; }
.workspace-header h2 { margin: 3px 0 0; font-size: 25px; letter-spacing: -.04em; }
.workspace-close, .transaction-editor header button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.82); border-radius: 50%; background: rgba(255,255,255,.48); box-shadow: inset 0 1px 0 rgba(255,255,255,.86); font-size: 20px; }
.workspace-tabs { display: grid; grid-template-columns: repeat(4,1fr); gap: 3px; height: 59px; padding: 5px 8px; border-bottom: 1px solid var(--line); }
.workspace-tabs button { min-width: 0; min-height: 44px; border: 0; border-radius: 17px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 690; }
.workspace-tabs button small { display: block; margin-top: 2px; overflow: hidden; font-size: 10px; letter-spacing: .035em; text-overflow: ellipsis; white-space: nowrap; }
.workspace-tabs button.is-active { color: white; background: var(--select-aurora); box-shadow: var(--select-shadow); }
.workspace-body { height: calc(100% - 129px); overflow: hidden auto; overscroll-behavior: contain; scrollbar-width: none; }
.workspace-body::-webkit-scrollbar { display: none; }
.workspace-panel { display: none; padding: 16px 14px 26px; }
.workspace-panel.is-active { display: block; }
.data-health-strip, .import-summary-grid { display: grid; grid-template-columns: repeat(3,1fr); overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.data-health-strip > div, .import-summary-grid > div { min-width: 0; padding: 11px 10px; border-left: 1px solid var(--line); }
.data-health-strip > div:first-child, .import-summary-grid > div:first-child { border-left: 0; }
.data-health-strip span, .import-summary-grid span { display: block; font-size: 11px; font-weight: 680; }
.data-health-strip strong, .import-summary-grid strong { display: block; max-width: 100%; margin-top: 6px; overflow: hidden; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-health-strip small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; letter-spacing: .035em; }
.workspace-section-head { display: flex; align-items: center; justify-content: space-between; min-height: 50px; margin-top: 12px; border-bottom: 1px solid var(--line); }
.workspace-section-head span { display: block; font-size: 14px; font-weight: 720; }
.workspace-section-head small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.workspace-section-head > button { min-width: 52px; min-height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 11px; }
.ledger-search-form, .editor-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 12px 0; }
.ledger-search-form label, .editor-grid label { min-width: 0; }
.ledger-search-form label.wide, .editor-grid label.wide { grid-column: 1 / -1; }
.ledger-search-form label > span, .editor-grid label > span { display: block; margin: 0 0 5px 3px; color: var(--muted); font-size: 10px; font-weight: 680; }
.ledger-search-form input, .ledger-search-form select, .editor-grid input, .editor-grid select, .editor-grid textarea, .inline-create-form input, .inline-create-form select { width: 100%; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid rgba(10,12,11,.1); border-radius: 15px; outline: 0; background: rgba(255,255,255,.58); color: var(--ink); font-size: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.76); }
.ledger-search-form input:focus, .ledger-search-form select:focus, .editor-grid input:focus, .editor-grid select:focus, .editor-grid textarea:focus { border-color: rgba(112,94,232,.55); box-shadow: 0 0 0 3px rgba(112,94,232,.1); }
.editor-grid textarea { min-height: 74px; padding-top: 11px; resize: vertical; }
.ledger-result-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ledger-result-head span { color: var(--muted); font-size: 11px; }
.ledger-result-head button { min-height: 44px; border: 0; background: transparent; font-size: 12px; font-weight: 700; }
.workspace-ledger-list { min-height: 150px; }
.workspace-transaction { display: grid; grid-template-columns: minmax(0,1fr) 9px; gap: 10px; align-items: center; min-height: 76px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.workspace-transaction button { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; width: 100%; min-width: 0; min-height: 54px; padding: 0; text-align: left; border: 0; background: transparent; }
.workspace-transaction-copy { min-width: 0; }
.workspace-transaction-copy strong { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-transaction-copy span { display: block; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-transaction-value { min-width: 0; max-width: 112px; overflow: hidden; text-align: right; }
.workspace-transaction-value strong { display: block; max-width: 100%; overflow: hidden; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.workspace-transaction-value small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.workspace-transaction.income .workspace-transaction-value strong { color: #087b5e; }
.quality-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); }
.quality-dot.pending { background: var(--coral); }
.empty-ledger { padding: 34px 18px; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.6; }
.workspace-export-row, .settings-actions, .import-actions, .editor-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.workspace-export-row button, .settings-actions button, .settings-actions label, .import-actions button, .import-actions label, .editor-actions button { display: inline-flex; align-items: center; justify-content: center; flex: 1 1 130px; min-height: 46px; padding: 0 14px; border: 1px solid rgba(255,255,255,.78); border-radius: 17px; background: rgba(255,255,255,.45); box-shadow: inset 0 1px 0 rgba(255,255,255,.82); font-size: 12px; font-weight: 680; text-align: center; cursor: pointer; }
.import-format-help { margin: 12px 2px 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.55; }
.import-format-help b { color: var(--ink); font-weight: 720; }
.workspace-primary { color: white !important; border-color: transparent !important; background: var(--ink) !important; box-shadow: 0 12px 26px rgba(10,12,11,.16) !important; }
#bill-file, #restore-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.workspace-intro { padding: 3px 2px 16px; border-bottom: 1px solid var(--line); }
.workspace-intro.compact { padding-bottom: 13px; }
.workspace-intro small { color: var(--muted); font-size: 10px; font-weight: 720; letter-spacing: .07em; }
.workspace-intro h3 { margin: 6px 0 8px; font-size: 24px; line-height: 1.08; letter-spacing: -.04em; }
.workspace-intro p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.import-rules { display: grid; grid-template-columns: repeat(2,1fr); gap: 0 12px; margin-top: 14px; padding: 12px 2px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.import-rules b { grid-column: 1 / -1; margin-bottom: 7px; font-size: 12px; }
.import-rules span { min-height: 25px; color: var(--muted); font-size: 10px; }
.import-rules span::before { content: "✓"; margin-right: 5px; color: #078060; font-weight: 800; }
.import-preview-empty { margin-top: 14px; padding: 28px 16px; border: 1px dashed rgba(10,12,11,.18); border-radius: 20px; color: var(--muted); font-size: 12px; line-height: 1.55; text-align: center; }
.import-summary-grid { margin-top: 14px; }
.import-summary-grid > div:nth-child(2) strong { color: #b46c11; }
.import-summary-grid > div:nth-child(3) strong { color: #d3493c; }
.import-file-meta { margin: 12px 2px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.import-preview-list { max-height: 280px; overflow: auto; border-top: 1px solid var(--line); }
.import-preview-row { display: grid; grid-template-columns: 52px minmax(0,1fr) auto; gap: 8px; align-items: center; min-height: 55px; padding: 7px 2px; border-bottom: 1px solid var(--line); }
.import-preview-row > b { font-size: 10px; }
.import-preview-row > span { min-width: 0; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.import-preview-row > small { max-width: 94px; overflow: hidden; color: var(--muted); font-size: 10px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.import-preview-row.is-error > b { color: #d3493c; }
.import-preview-row.is-duplicate > b { color: #b46c11; }
.settings-block { margin-top: 14px; }
.inline-create-form { display: grid; grid-template-columns: minmax(0,1fr) 96px 56px; gap: 7px; margin-top: 10px; }
.inline-create-form button { min-height: 44px; border: 0; border-radius: 15px; background: var(--ink); color: white; font-size: 12px; }
.settings-list { margin-top: 8px; border-top: 1px solid var(--line); }
.settings-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; min-height: 54px; border-bottom: 1px solid var(--line); font-size: 12px; }
.settings-row span { color: var(--muted); font-size: 10px; }
.settings-copy { min-width: 0; }
.settings-copy b, .settings-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-copy span { margin-top: 3px; }
.settings-row-actions { display: flex; gap: 2px; }
.settings-row-actions button { min-width: 44px; min-height: 44px; padding: 0 7px; border: 0; background: transparent; color: var(--muted); font-size: 10px; }
.category-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 0 12px; }
.danger-action { color: #b93635 !important; }
.audit-quality { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-top: 14px; }
.audit-quality > div { min-height: 76px; padding: 12px; border: 1px solid rgba(255,255,255,.68); border-radius: 18px; background: rgba(255,255,255,.3); }
.audit-quality span { color: var(--muted); font-size: 10px; }
.audit-quality strong { display: block; margin-top: 8px; font-size: 19px; }
.audit-list { border-top: 1px solid var(--line); }
.audit-row { padding: 11px 2px; border-bottom: 1px solid var(--line); }
.audit-row strong { display: block; overflow-wrap: anywhere; font-size: 12px; }
.audit-row span { display: block; margin-top: 4px; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; line-height: 1.4; }
.audit-row:has(> div) { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; }
.audit-row > div { min-width: 0; }
.audit-row > button { min-height: 38px; padding: 0 12px; border: 1px solid rgba(17,17,20,.1); border-radius: 13px; background: rgba(255,255,255,.54); font-size: 11px; font-weight: 750; }
.transaction-editor { position: absolute; inset: 65px 10px 10px; z-index: 4; overflow: hidden auto; padding: 14px; border: 1px solid rgba(255,255,255,.86); border-radius: 26px; background: rgba(244,246,242,.96); box-shadow: 0 22px 64px rgba(18,21,19,.25); backdrop-filter: blur(34px) saturate(155%); }
.transaction-editor header { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.transaction-editor header h3 { margin: 3px 0 0; font-size: 22px; letter-spacing: -.035em; }
.action-dialog { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; padding: 24px; background: rgba(22,23,31,.16); backdrop-filter: blur(18px) saturate(115%); -webkit-backdrop-filter: blur(18px) saturate(115%); }
.action-dialog.is-hidden { display: none; }
.action-dialog-card { width: min(100%,390px); padding: 28px; border: 1px solid rgba(255,255,255,.86); border-radius: 30px; background: linear-gradient(145deg,rgba(255,255,255,.88),rgba(247,244,255,.7)); box-shadow: 0 28px 80px rgba(32,30,49,.22), inset 0 1px 0 rgba(255,255,255,.96); }
.action-dialog-mark { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 20px; border: 1px solid rgba(16,16,18,.12); border-radius: 50%; color: #fff; background: linear-gradient(145deg,#7b67f8,#2bc8cf); box-shadow: 0 12px 28px rgba(102,92,222,.24); font-size: 20px; font-weight: 850; }
.action-dialog-card > small, .action-dialog-input span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.action-dialog-card h3 { margin: 8px 0 10px; font-size: 28px; letter-spacing: -.04em; }
.action-dialog-card > p:not(.form-error) { margin: 0; color: #5f5e67; font-size: 14px; line-height: 1.65; }
.action-dialog-input { display: grid; gap: 8px; margin-top: 22px; }
.action-dialog-input.is-hidden { display: none; }
.action-dialog-input input { min-height: 50px; padding: 0 15px; border: 1px solid rgba(19,19,22,.12); border-radius: 16px; outline: 0; background: rgba(255,255,255,.66); font: inherit; }
.action-dialog-input input:focus { border-color: rgba(112,94,244,.5); box-shadow: 0 0 0 4px rgba(112,94,244,.1); }
.action-dialog-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; margin-top: 24px; }
.action-dialog-actions button { min-height: 48px; border: 0; border-radius: 16px; font-weight: 800; }
.action-dialog-actions button:first-child { background: rgba(21,21,24,.07); }
.action-dialog-actions .is-danger { color: #fff; background: #161619; }
.period-dialog { position: absolute; inset: 0; z-index: 85; display: flex; align-items: flex-end; padding: 16px 12px 14px; background: rgba(26,25,34,.16); backdrop-filter: blur(18px) saturate(125%); -webkit-backdrop-filter: blur(18px) saturate(125%); }
.period-dialog.is-hidden { display: none; }
.period-dialog-card { width: 100%; padding: 22px; border: 1px solid rgba(255,255,255,.88); border-radius: 32px; background: linear-gradient(145deg,rgba(252,252,248,.92),rgba(238,235,255,.82)); box-shadow: 0 24px 72px rgba(37,34,59,.25), inset 0 1px 0 white; }
.period-dialog-card header { display: flex; align-items: center; justify-content: space-between; }
.period-dialog-card header span { color: var(--muted); font-size: 10px; font-weight: 780; letter-spacing: .14em; }
.period-dialog-card h2 { margin: 4px 0 0; font-size: 28px; letter-spacing: -.045em; }
.period-dialog-card header button { width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.9); border-radius: 50%; background: rgba(255,255,255,.48); font-size: 22px; }
.period-mode-switch { display: grid; grid-template-columns: repeat(2,1fr); gap: 5px; margin: 20px 0 18px; padding: 4px; border-radius: 19px; background: rgba(31,30,36,.06); }
.period-mode-switch button { min-height: 42px; border: 0; border-radius: 15px; color: var(--muted); background: transparent; font-weight: 730; }
.period-mode-switch button.is-selected { color: #fff; background: var(--select-aurora); box-shadow: var(--select-shadow); }
.period-form-panel label { display: grid; gap: 7px; }
.period-form-panel label span { color: var(--muted); font-size: 10px; font-weight: 740; letter-spacing: .04em; }
.period-form-panel input { min-width: 0; min-height: 52px; padding: 0 15px; border: 1px solid rgba(17,17,19,.1); border-radius: 17px; outline: 0; background: rgba(255,255,255,.62); font: inherit; font-weight: 700; }
.period-form-panel input:focus { border-color: rgba(108,91,244,.48); box-shadow: 0 0 0 4px rgba(108,91,244,.09); }
.period-form-panel > p { margin: 10px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.period-form-panel.is-hidden { display: none; }
.period-custom-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.period-apply { width: 100%; min-height: 52px; margin-top: 7px; border: 0; border-radius: 18px; color: white; background: #111214; font-weight: 800; }
.editor-provenance { padding: 11px 2px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.5; }
.editor-actions { justify-content: flex-end; }
.editor-actions button { flex: 0 1 142px; }
.form-error { min-height: 20px; margin: 9px 2px 0; color: #b93635; font-size: 11px; line-height: 1.4; }

.toast { position: absolute; z-index: 110; left: 50%; bottom: 98px; width: max-content; max-width: 320px; padding: 13px 17px; border-radius: 18px; color: white; background: rgba(10,11,11,.92); box-shadow: 0 15px 34px rgba(0,0,0,.22); backdrop-filter: blur(18px); font-size: 12px; line-height: 1.45; opacity: 0; transform: translate(-50%,18px) scale(.94); pointer-events: none; transition: opacity 180ms, transform 320ms var(--ease); }
.toast.is-visible { opacity: 1; transform: translate(-50%,0) scale(1); pointer-events: auto; }
.home-indicator { position: absolute; z-index: 70; bottom: 5px; left: 50%; width: 132px; height: 5px; transform: translateX(-50%); border-radius: 4px; background: #090909; }

@keyframes ambient-veil {
  0% { transform: translate3d(-2%, -1%, 0) rotate(-4deg) scale(1); opacity: .62; }
  50% { transform: translate3d(4%, 3%, 0) rotate(7deg) scale(1.06); opacity: .8; }
  100% { transform: translate3d(-1%, 6%, 0) rotate(-8deg) scale(.98); opacity: .68; }
}
@keyframes ambient-sheen {
  0% { transform: translate3d(-16%, -4%, 0) rotate(-5deg); opacity: .24; }
  55% { transform: translate3d(10%, 3%, 0) rotate(3deg); opacity: .46; }
  100% { transform: translate3d(18%, -2%, 0) rotate(-2deg); opacity: .3; }
}
@keyframes ambient-specular {
  0% { transform: translate3d(-5%, -4%, 0) rotate(-5deg) scale(.96); opacity: .62; }
  52% { transform: translate3d(7%, 4%, 0) rotate(8deg) scale(1.06); opacity: .9; }
  100% { transform: translate3d(-1%, 10%, 0) rotate(-3deg) scale(1.01); opacity: .72; }
}
@keyframes ambient-caustic {
  to { transform: rotate(360deg) scale(1.08); }
}
@keyframes ambient-drift-one {
  0% { transform: translate3d(-34px, -28px, 0) rotate(-16deg) scale(.92, 1.11); }
  48% { transform: translate3d(42px, 24px, 0) rotate(18deg) scale(1.13, .89); }
  100% { transform: translate3d(-12px, 62px, 0) rotate(38deg) scale(.96, 1.15); }
}
@keyframes ambient-drift-two {
  0% { transform: translate3d(18px, 48px, 0) rotate(12deg) scale(1.12, .91); }
  46% { transform: translate3d(58px, -34px, 0) rotate(-23deg) scale(.89, 1.15); }
  100% { transform: translate3d(-46px, -56px, 0) rotate(-39deg) scale(1.15, .88); }
}
@keyframes ambient-drift-three {
  0% { transform: translate3d(-36px, 18px, 0) rotate(-22deg) scale(.89, 1.15); }
  51% { transform: translate3d(48px, -52px, 0) rotate(28deg) scale(1.17, .87); }
  100% { transform: translate3d(62px, 38px, 0) rotate(46deg) scale(.88, 1.17); }
}
@keyframes ambient-drift-four {
  0% { transform: translate3d(-52px, 34px, 0) rotate(-29deg) scale(.85, 1.18); }
  44% { transform: translate3d(56px, -46px, 0) rotate(17deg) scale(1.2, .85); }
  100% { transform: translate3d(12px, 68px, 0) rotate(47deg) scale(.91, 1.16); }
}

@media (hover: hover) {
  button:not(:disabled):hover { filter: brightness(.98); }
  .pulse-metrics button:hover, .node-card:hover { background: rgba(255,255,255,.34); }
}

button:active:not(:disabled), .insight-row:active, .round-control:active { transform: scale(.97); }

@media (max-width: 800px) {
  body { background: var(--paper); }
  .stage { display: block; min-height: 100svh; padding: 0; }
  .prototype-note { display: none; }
  .phone { width: 100%; height: 100svh; min-height: 720px; border: 0; border-radius: 0; box-shadow: none; }
  .phone::after, .hardware-rail { display: none; }
  .view { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
}

@media (max-height: 760px) {
  .view { padding-top: 48px; padding-bottom: 92px; }
  .brandbar, .page-header { height: 39px; margin-bottom: 4px; }
  .screen-heading h2, .page-header .screen-heading h2 { font-size: 32px; }
  .scope-switch { margin: 6px 0 6px; }
  .period-toolbar { min-height: 44px; margin-bottom: 6px; }
  .pulse-panel { min-height: 330px; }
  .pulse-summary-row { min-height: 110px; }
  .wave-stage { height: 98px; }
  .pulse-metrics button { min-height: 64px; }
  .insight-row { min-height: 54px; }
  .flow-summary { min-height: 112px; }
  .ledger-scroll { height: calc(100% - 213px); min-height: 350px; }
  .close-summary { padding: 18px; }
  .recon-ledger { margin: 17px 0; padding: 14px 0; }
  .recon-count strong { font-size: 54px; }
  .future-presets { margin-top: 8px; }
  .future-workbench { padding: 17px; }
  .future-total-block { margin-top: 12px; }
  .future-total-block > strong { font-size: 37px; }
  .future-projection { height: 52px; margin: 9px 0 10px; }
  .scenario-control { min-height: 62px; padding: 9px 0 7px; }
  .future-statement { min-height: 54px; padding-top: 9px; }
  .quick-sheet { inset: 52px 12px 9px; padding: 16px; border-radius: 32px; }
  .quick-amount-panel { min-height: 94px; }
  .quick-category-grid > button { min-height: 54px; }
  .number-pad { margin-top: 10px; }
  .number-pad button { min-height: 44px; }
  .app-dock { height: 66px; bottom: 8px; }
  .app-dock > button, .dock-liquid, .app-dock .quick-trigger { height: 52px; }
  .app-dock .quick-trigger { width: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 160ms !important; }
  .ambient-spectrum::before, .ambient-spectrum::after, .ambient-spectrum i b, .ambient-spectrum i b::before, .ambient-spectrum i b::after { animation: none !important; transform: none !important; }
  .ambient-spectrum i { --ambient-x: 0px; --ambient-y: 0px; --ambient-scroll: 0px; }
  .view { transform: none !important; filter: none !important; }
  .quick-space, .object-detail, .workspace-space, .workspace-sheet, .action-dialog, .period-dialog { transform: none !important; }
  .quick-space.is-open .quick-sheet { clip-path: inset(0 round 36px) !important; -webkit-clip-path: inset(0 round 36px) !important; }
}

@supports not (backdrop-filter: blur(2px)) {
  .liquid-glass, .pulse-panel, .close-summary, .future-ribbon, .future-workbench, .ledger-scroll, .app-dock, .object-detail, .workspace-sheet, .action-dialog-card { background: rgba(247,247,243,.96); }
  .quick-sheet { background: rgba(241,243,240,.98); }
}
