/* ============================================================================
   BUDGETGRID — Envelope mode (#/envelope). Warm, radically simple,
   big type, 44px+ targets, Fraunces money. Prefix .portal-envelope / .ev-.
   Tokens only — no hex. Legible in both themes (the portal forces light).
   ==========================================================================*/
.portal-envelope .phone-stage.ev-stage { background: radial-gradient(900px 520px at 50% -10%, var(--amber-wash), transparent 62%), var(--bg); }
.portal-envelope .ev-phone { background: var(--bg); }
.portal-envelope .ev-status { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px 4px; font-size: 13px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; flex: none; }
.portal-envelope .ev-status-r { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); } .portal-envelope .ev-status-r .ic { width: 14px; height: 14px; }
.portal-envelope .ev-sig { display: inline-block; width: 14px; height: 10px; background: linear-gradient(to right, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 6px, transparent 6px 8px, var(--ink) 8px 10px, transparent 10px 12px, var(--ink) 12px 14px); clip-path: polygon(0 70%, 100% 0, 100% 100%, 0 100%); }
.portal-envelope .ev-bat { display: inline-block; width: 20px; height: 10px; border: 1.5px solid var(--ink-2); border-radius: 3px; position: relative; } .portal-envelope .ev-bat::after { content: ''; position: absolute; inset: 1.5px; right: 5px; background: var(--grid); border-radius: 1px; }
.portal-envelope .ev-screen { padding: 0 16px 20px; scrollbar-width: none; } .portal-envelope .ev-screen::-webkit-scrollbar { display: none; }
.portal-envelope .ev-view { display: flex; flex-direction: column; }
.portal-envelope .ev-bar { flex: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; padding: 6px 6px 10px; border-top: 1px solid var(--line); background: var(--card); }
.portal-envelope .ev-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; border: none; background: transparent; border-radius: var(--r-2); font: inherit; font-size: 11.5px; font-weight: 700; color: var(--ink-3); cursor: pointer; transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-spring); }
.portal-envelope .ev-tab .ic { width: 22px; height: 22px; } .portal-envelope .ev-tab:active { transform: scale(.94); } .portal-envelope .ev-tab.is-on { color: var(--grid-ink); background: var(--grid-wash); }
.portal-envelope h1 { font-size: 28px; margin: 14px 0 4px; } .portal-envelope h2 { font-size: 22px; margin: 0; } .portal-envelope h3 { font-size: 17px; margin: 18px 0 8px; }
.portal-envelope .ev-lead { color: var(--ink-2); font-size: 14px; margin: 0 0 12px; }
.portal-envelope .ev-big { font-size: 34px; line-height: 1.1; margin: 4px 0 12px; overflow-wrap: anywhere; }
.portal-envelope .ev-label { font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; margin: 14px 0 6px; }
.portal-envelope .ev-wrap { white-space: normal; }

/* ---- home */
.portal-envelope .ev-hello { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 6px; } .portal-envelope .ev-hello h1 { margin-top: 8px; overflow-wrap: anywhere; }
.portal-envelope .ev-date { color: var(--ink-3); font-size: 13px; font-weight: 600; }
.portal-envelope .ev-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.portal-envelope .ev-total { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-3); padding: 12px 14px; min-width: 0; box-shadow: var(--shadow-1); }
.portal-envelope .ev-total-l { display: block; font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portal-envelope .ev-total-v { display: block; font-size: 21px; margin-top: 4px; overflow-wrap: anywhere; line-height: 1.15; } .portal-envelope .ev-total-sales .ev-total-v { color: var(--grid-ink); }
.portal-envelope .ev-insights { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 6px; }
.portal-envelope .ev-insight { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-2); font-size: 13.5px; font-weight: 600; background: var(--neutral-wash); color: var(--ink-2); } .portal-envelope .ev-insight .ic { width: 18px; height: 18px; flex: none; }
.portal-envelope .ev-insight-grid { background: var(--grid-wash); color: var(--grid-ink); } .portal-envelope .ev-insight-brick { background: var(--brick-wash); color: var(--brick-ink); } .portal-envelope .ev-insight-cobalt { background: var(--cobalt-wash); color: var(--cobalt-ink); } .portal-envelope .ev-insight-amber { background: var(--amber-wash); color: var(--amber-ink); } .portal-envelope .ev-insight-teal { background: var(--teal-wash); color: var(--teal-ink); }
.portal-envelope .ev-h2 { font-size: 20px; margin: 14px 0 8px; }
.portal-envelope .ev-cards { display: flex; flex-direction: column; gap: 10px; }
.portal-envelope .ev-card { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--grid); border-radius: var(--r-3); padding: 14px 16px; cursor: pointer; box-shadow: var(--shadow-1); transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast); }
.portal-envelope .ev-card:active { transform: scale(.985); } .portal-envelope .ev-card:hover { box-shadow: var(--shadow-2); }
.portal-envelope .ev-card-amber { border-left-color: var(--amber); } .portal-envelope .ev-card-brick { border-left-color: var(--brick); } .portal-envelope .ev-card.is-locked { border-left-color: var(--teal); }
.portal-envelope .ev-card-top { display: flex; align-items: center; gap: 10px; }
.portal-envelope .ev-card-ic { width: 34px; height: 34px; border-radius: 11px; background: var(--grid-wash); color: var(--grid-ink); display: grid; place-items: center; flex: none; } .portal-envelope .ev-card-ic .ic { width: 18px; height: 18px; }
.portal-envelope .ev-card-amber .ev-card-ic { background: var(--amber-wash); color: var(--amber-ink); } .portal-envelope .ev-card-brick .ev-card-ic { background: var(--brick-wash); color: var(--brick-ink); } .portal-envelope .is-locked .ev-card-ic { background: var(--teal-wash); color: var(--teal-ink); }
.portal-envelope .ev-card-name { font-weight: 700; font-size: 16px; flex: 1; min-width: 0; } .portal-envelope .ev-lock { color: var(--teal-ink); display: inline-flex; } .portal-envelope .ev-lock .ic { width: 18px; height: 18px; }
.portal-envelope .ev-card-amt { font-size: 30px; line-height: 1.1; margin: 10px 0 8px; overflow-wrap: anywhere; } .portal-envelope .ev-card-brick .ev-card-amt { color: var(--brick-ink); } .portal-envelope .ev-card-amber .ev-card-amt { color: var(--amber-ink); }
.portal-envelope .ev-card .meter { height: 10px; }
.portal-envelope .ev-card-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 7px; }
.portal-envelope .ev-card-rule { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 12.5px; font-weight: 600; color: var(--teal-ink); background: var(--teal-wash); padding: 6px 10px; border-radius: var(--r-2); max-width: 100%; } .portal-envelope .ev-card-rule .ic { width: 15px; height: 15px; flex: none; } .portal-envelope .ev-card-rule.is-none { color: var(--ink-3); background: var(--neutral-wash); }
.ev-sheet .ev-big { font-size: 34px; line-height: 1.1; margin: 4px 0 12px; overflow-wrap: anywhere; }
.ev-sheet .ev-card-rule { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--teal-ink); background: var(--teal-wash); padding: 7px 11px; border-radius: var(--r-2); max-width: 100%; } .ev-sheet .ev-card-rule .ic { width: 15px; height: 15px; flex: none; } .ev-sheet .ev-card-rule.is-none { color: var(--ink-3); background: var(--neutral-wash); }
.ev-sheet .ev-detail h4 { margin: 16px 0 4px; } .ev-sheet .ev-moves .list-item { padding-inline: 4px; margin-inline: 0; }
.ev-sheet .ev-raw { white-space: pre-wrap; word-break: break-word; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-2); padding: 10px 12px; margin: 12px 0 8px; font-size: 12px; color: var(--ink-2); }
.ev-sheet .ev-big.neg, .ev-sheet .ev-dr { color: var(--ink); } .ev-sheet .ev-big.neg { color: var(--brick-ink); } .ev-sheet .ev-cr { color: var(--grid-ink); }
.ev-sheet .modal-actions .btn { min-height: 48px; flex: 1; }
.ev-sheet .ev-blocked { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 6px 0 4px; } .ev-sheet .ev-blocked > .ic { width: 44px; height: 44px; color: var(--brick-ink); } .ev-sheet .ev-blocked-msg { font-size: 17px; font-weight: 600; line-height: 1.35; margin: 0; color: var(--ink); }
.ev-sheet .ev-rule-meter { width: 100%; } .ev-sheet .ev-rule-meter small { display: block; margin-top: 6px; color: var(--ink-3); }

/* ---- add */
.portal-envelope .ev-bigbtns { display: grid; gap: 12px; margin-top: 12px; }
.portal-envelope .ev-bigbtn { display: flex; align-items: center; gap: 14px; padding: 18px; min-height: 88px; border-radius: var(--r-3); border: none; font: inherit; text-align: left; cursor: pointer; color: var(--on-fill); box-shadow: var(--shadow-2); transition: transform var(--t-fast) var(--ease-spring); }
.portal-envelope .ev-bigbtn:active { transform: scale(.98); } .portal-envelope .ev-bigbtn > .ic { width: 30px; height: 30px; flex: none; } .portal-envelope .ev-bigbtn b { display: block; font-family: var(--font-display); font-size: 21px; font-weight: 600; } .portal-envelope .ev-bigbtn small { display: block; opacity: .85; font-size: 13px; margin-top: 2px; }
.portal-envelope .ev-bigbtn-spend { background: var(--ink); color: var(--inverse); } .portal-envelope .ev-bigbtn-sale { background: var(--grid); }
.portal-envelope .ev-capture-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; } .portal-envelope .ev-capture-btns .btn { min-height: 56px; font-size: 15px; }
.portal-envelope .ev-btn-wa { background: var(--grid); border-color: var(--grid); color: var(--on-fill); }
.portal-envelope .ev-form-head { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; } .portal-envelope .ev-form-head .icon-btn { width: 44px; height: 44px; margin-left: -8px; }
.portal-envelope .ev-amount { display: flex; align-items: baseline; justify-content: center; gap: 4px; padding: 16px 0 6px; } .portal-envelope .ev-amount-sym { font-family: var(--font-display); font-size: 26px; color: var(--ink-3); } .portal-envelope .ev-amount-v { font-size: 46px; line-height: 1; letter-spacing: -0.02em; }
.portal-envelope .ev-keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0 4px; }
.portal-envelope .ev-key { min-height: 54px; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--card); font: inherit; font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--ink); cursor: pointer; display: grid; place-items: center; transition: background var(--t-fast), transform var(--t-fast); } .portal-envelope .ev-key:active { background: var(--bg-3); transform: scale(.96); } .portal-envelope .ev-key .ic { width: 24px; height: 24px; } .portal-envelope .ev-key-del { color: var(--brick-ink); }
.portal-envelope .ev-chips { gap: 8px; } .portal-envelope .ev-chips .chip, .portal-envelope .ev-hows .chip, .portal-envelope .ev-samples .chip, .portal-envelope .ev-asks .chip { font-size: 14px; padding: 9px 14px; min-height: 44px; border-radius: var(--r-pill); cursor: pointer; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); white-space: normal; text-align: left; font: inherit; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.portal-envelope .ev-chips .chip.is-on, .portal-envelope .ev-hows .chip.is-on { background: var(--ink); color: var(--inverse); border-color: var(--ink); }
.portal-envelope .ev-chip small { font-size: 11.5px; opacity: .75; font-weight: 600; } .portal-envelope .ev-chip.is-locked { color: var(--teal-ink); } .portal-envelope .ev-chip.is-locked.is-on { color: var(--inverse); }
.portal-envelope .ev-samples .chip { font-style: italic; } .portal-envelope .ev-asks .chip { font-size: 13px; }
.portal-envelope .ev-note { min-height: 48px; font-size: 16px; }
.portal-envelope .ev-save { margin-top: 16px; }
.portal-envelope .ev-voice { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; } .portal-envelope .ev-voice-idle { align-items: center; text-align: center; padding-top: 22px; }
.portal-envelope .ev-mic { width: 120px; height: 120px; border-radius: 50%; border: none; background: var(--brick); color: var(--on-fill); display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 10px var(--brick-wash), var(--shadow-2); transition: transform var(--t-fast) var(--ease-spring); } .portal-envelope .ev-mic .ic { width: 48px; height: 48px; } .portal-envelope .ev-mic:active, .portal-envelope .ev-mic.is-rec { transform: scale(1.08); animation: breathe 1s ease-in-out infinite; }
.portal-envelope .ev-mic-l { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin-top: 6px; }
.portal-envelope .ev-transcript { font-size: 16px; min-height: 84px; }
.portal-envelope .ev-wa { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.portal-envelope .ev-wa-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-2); background: var(--grid); color: var(--on-fill); } .portal-envelope .ev-wa-head b { display: block; font-size: 14px; } .portal-envelope .ev-wa-head small { display: block; opacity: .9; font-size: 12px; }
.portal-envelope .ev-wa-chat { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--r-3); background: var(--bg-2); border: 1px solid var(--line); min-height: 120px; }
.portal-envelope .ev-bubble { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.4; box-shadow: var(--shadow-1); } .portal-envelope .ev-bubble-in { align-self: flex-start; background: var(--card); color: var(--ink); border-bottom-left-radius: 4px; } .portal-envelope .ev-bubble-out { align-self: flex-end; background: var(--grid-wash); color: var(--ink); border-bottom-right-radius: 4px; }
.portal-envelope .ev-wa-input { display: flex; gap: 8px; } .portal-envelope .ev-wa-input .input { min-height: 48px; font-size: 16px; } .portal-envelope .ev-wa-input .btn { width: 48px; min-height: 48px; padding: 0; flex: none; border-radius: 50%; }
.portal-envelope .ev-confirm { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; border-left: 5px solid var(--plum); }
.portal-envelope .ev-confirm-h { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--plum-ink); } .portal-envelope .ev-seg { display: grid; grid-template-columns: 1fr 1fr; } .portal-envelope .ev-seg button { min-height: 40px; font-size: 14px; }
.portal-envelope .ev-confirm .input { min-height: 48px; font-size: 16px; } .portal-envelope .ev-confirm .ev-save { margin-top: 4px; }

/* ---- move */
.portal-envelope .ev-moved { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin-top: 10px; border-left: 5px solid var(--grid); }
.portal-envelope .ev-moved-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--grid-wash); color: var(--grid-ink); display: grid; place-items: center; } .portal-envelope .ev-moved-ic .ic { width: 28px; height: 28px; }
.portal-envelope .ev-moved-t { font-family: var(--font-display); font-size: 19px; font-weight: 600; overflow-wrap: anywhere; } .portal-envelope .ev-moved .li-s, .portal-envelope .ev-owner .li-s { white-space: normal; }
.portal-envelope .ev-ref { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 4px; } .portal-envelope .ev-ref .mono { color: var(--ink); }

/* ---- rules */
.portal-envelope .ev-rules-list { display: flex; flex-direction: column; gap: 10px; }
.portal-envelope .ev-rule { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--grid); border-radius: var(--r-3); padding: 14px 16px; box-shadow: var(--shadow-1); } .portal-envelope .ev-rule.is-locked { border-left-color: var(--teal); }
.portal-envelope .ev-rule-head { display: flex; align-items: center; gap: 10px; }
.portal-envelope .ev-lock-l { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; min-height: 44px; } .portal-envelope .ev-lock-l .switch { width: 50px; height: 30px; } .portal-envelope .ev-lock-l .switch::after { width: 24px; height: 24px; } .portal-envelope .ev-lock-l .switch.is-on { background: var(--teal); } .portal-envelope .ev-lock-l .switch.is-on::after { transform: translateX(20px); }
.portal-envelope .ev-rule-now { display: flex; align-items: center; gap: 8px; margin: 10px 0 8px; font-size: 14.5px; font-weight: 600; color: var(--teal-ink); } .portal-envelope .ev-rule-now.is-none { color: var(--ink-3); } .portal-envelope .ev-rule-now .ic { width: 18px; height: 18px; flex: none; }
.portal-envelope .ev-cap-row { display: flex; align-items: flex-end; gap: 8px; } .portal-envelope .ev-cap-row .input { min-height: 48px; } .portal-envelope .ev-cap-save { min-height: 48px; flex: none; }
.portal-envelope .ev-rule-preview { font-size: 13px; color: var(--ink-2); margin-top: 6px; min-height: 1em; font-style: italic; }
.portal-envelope .ev-rule-meter { margin-top: 10px; } .portal-envelope .ev-rule-meter small { display: block; margin-top: 5px; color: var(--ink-3); }

/* ---- more */
.portal-envelope .ev-owner { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; } .portal-envelope .ev-owner-n { font-weight: 700; font-size: 16px; }
.portal-envelope .ev-owner-acct { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--r-2); background: var(--bg-2); border: 1px solid var(--line); } .portal-envelope .ev-owner-acct > .ic { width: 26px; height: 26px; color: var(--ink-3); } .portal-envelope .ev-owner-bal { font-size: 24px; overflow-wrap: anywhere; }
.portal-envelope .ev-langs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.portal-envelope .ev-lang { min-height: 46px; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--card); font: inherit; font-weight: 700; font-size: 14px; color: var(--ink-2); cursor: pointer; transition: background var(--t-fast), color var(--t-fast); } .portal-envelope .ev-lang.is-on { background: var(--ink); color: var(--inverse); border-color: var(--ink); }
.portal-envelope .ev-ask { display: flex; gap: 8px; margin-bottom: 8px; } .portal-envelope .ev-ask .input { min-height: 48px; font-size: 16px; } .portal-envelope .ev-ask .btn { width: 48px; min-height: 48px; padding: 0; flex: none; }
.portal-envelope .ev-answer { margin-top: 12px; padding: 14px; border-radius: var(--r-3); background: var(--plum-wash); border-left: 5px solid var(--plum); display: flex; flex-direction: column; gap: 8px; } .portal-envelope .ev-answer-q { font-weight: 700; color: var(--plum-ink); font-size: 13.5px; } .portal-envelope .ev-answer-a { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
.portal-envelope .ev-upgrade { margin-top: 18px; border-left: 5px solid var(--korevra); } .portal-envelope .ev-upgrade-h { display: flex; align-items: center; gap: 10px; } .portal-envelope .ev-upgrade-h h3 { margin: 0; } .portal-envelope .ev-upgrade p { font-size: 14px; color: var(--ink-2); margin: 10px 0 12px; }
.portal-envelope .ev-history .list-item { padding-inline: 4px; margin-inline: 0; }
.portal-envelope .ev-lane { width: 34px; height: 34px; border-radius: 10px; background: var(--neutral-wash); color: var(--ink-3); display: grid; place-items: center; flex: none; } .portal-envelope .ev-lane .ic { width: 16px; height: 16px; } .portal-envelope .ev-lane-gateway { background: var(--grid-wash); color: var(--grid-ink); } .portal-envelope .ev-lane-receipt { background: var(--plum-wash); color: var(--plum-ink); }
.portal-envelope .ev-move .li-end { font-size: 15px; } .portal-envelope .ev-dr { color: var(--ink); } .portal-envelope .ev-cr { color: var(--grid-ink); }
.ev-sheet .ev-lane { width: 34px; height: 34px; border-radius: 10px; background: var(--neutral-wash); color: var(--ink-3); display: grid; place-items: center; flex: none; } .ev-sheet .ev-lane .ic { width: 16px; height: 16px; }

/* full-screen phone: the global launcher sits bottom-right, so keep the fifth tab clear of it */
@media (max-width: 640px) { .portal-envelope .ev-status { padding-top: 10px; } .portal-envelope .ev-bar { padding-bottom: 14px; padding-right: 76px; } }
