/* ============================================================
   Yo-Mo — Neumorphic UI
   A single, soft, extruded surface in lavender + Poppins.

   DESIGN SYSTEM (read this before adding UI)
   ------------------------------------------------------------
   Everything lives on ONE continuous surface. Depth is created
   only by paired shadows — a light highlight from the top-left
   and a soft dark shadow to the bottom-right. We do NOT use
   borders or hairlines to separate things; we raise them up or
   press them in.

     • RAISED  (cards, buttons, nav, tiles): the surface gradient
       + an outset shadow pair  → var(--shadow-raised[-sm|-lg])
     • PRESSED / WELL (inputs, tracks, segmented controls): an
       inset shadow pair        → var(--shadow-inset[-sm])
     • Accent fills (primary buttons, active nav): the purple
       gradient var(--grad-primary); destructive: var(--grad-danger).

   Helpers `.raised`, `.inset`, `.well` are available for new
   markup. Reuse the tokens below — never hardcode colors.
   ============================================================ */

:root {
  /* ---- Surfaces (page and cards share one color family) ---- */
  --bg:            #e7e3f3;   /* page base */
  --bg-deep:       #dcd7ec;   /* recessed wells, tracks, segmented bg */
  --surface:       linear-gradient(145deg, #f0edf9, #e4e0f1);  /* raised face */
  --surface-solid: #ebe8f5;   /* opaque equivalent (mobile drawer) */
  --surface-tint:  #e6e2f1;   /* gentle recessed tint (row hover) */
  --input-bg:      #f3f0fb;   /* light well for typed-in fields */

  /* ---- Ink ---- */
  --ink:       #36363f;   /* strong headings */
  --ink-soft:  #41414f;   /* body text */
  --ink-mute:  #8b89a3;   /* secondary / labels */
  --ink-faint: #b1afc6;   /* placeholders / faint */
  --hairline:  rgba(150,146,180,0.20);  /* whisper-soft divider (tables only) */

  /* ---- Brand purple ---- */
  --primary:      #4836c4;
  --primary-deep: #3a2bb0;
  --primary-lite: #6b5ce8;
  --primary-soft: #d7d2f0;
  --primary-tint: #e3def3;

  /* ---- Orange ---- */
  --orange:       #f97347;
  --orange-deep:  #ec4f30;

  /* ---- Semantic (faithful to the reference's purple+orange pairing:
          income/positive = purple, expense/negative = orange) ---- */
  --pos:       #4836c4;
  --pos-soft:  #e0dbf4;
  --neg:       #ec4f30;
  --neg-soft:  #fbddd2;
  --neg-ink:   #b83417;
  --warn:      #f97347;
  --warn-soft: #fbe2d2;
  --warn-ink:  #b8521f;

  /* ---- Neumorphic shadow primitives ---- */
  --sl:      rgba(255,255,255,0.95);   /* light highlight */
  --sd:      rgba(170,167,196,0.55);   /* soft dark */
  --sl-soft: rgba(255,255,255,0.80);
  --sd-soft: rgba(170,167,196,0.42);

  --shadow-raised-sm: -5px -5px 11px var(--sl), 5px 5px 12px var(--sd);
  --shadow-raised:    -8px -8px 18px var(--sl), 9px 9px 20px var(--sd);
  --shadow-raised-lg: -11px -11px 22px var(--sl), 12px 12px 26px var(--sd);
  --shadow-inset:     inset -5px -5px 10px var(--sl-soft), inset 5px 5px 11px var(--sd-soft);
  --shadow-inset-sm:  inset -3px -3px 6px var(--sl-soft), inset 3px 3px 7px var(--sd-soft);
  --inner-lip:        inset 1px 1px 2px rgba(255,255,255,0.28);  /* top sheen on filled buttons */

  /* ---- Gradients ---- */
  --grad-primary: linear-gradient(135deg, var(--primary-lite), var(--primary-deep));
  --grad-danger:  linear-gradient(135deg, var(--orange), var(--orange-deep));

  /* ---- Radii (soft & round) ---- */
  --r-xs:   10px;
  --r-sm:   14px;
  --r-md:   18px;
  --r-lg:   26px;
  --r-xl:   32px;
  --r-pill: 999px;

  /* ---- Aliases kept so existing selectors resolve ---- */
  --text:        var(--ink-soft);
  --muted:       var(--ink-mute);
  --border:      var(--hairline);
  --accent:      var(--primary);
  --accent-dark: var(--primary-deep);
  --accent-soft: var(--primary-soft);
  --success:     var(--pos);
  --danger:      var(--neg);
  --radius:      var(--r-lg);
  --radius-sm:   var(--r-sm);
  --shadow:      var(--shadow-raised-sm);
  --shadow-md:   var(--shadow-raised);
  --shadow-flat: var(--shadow-raised-sm);
  --shadow-soft: var(--shadow-raised-sm);
  --shadow-card: var(--shadow-raised);
  --shadow-pop:  var(--shadow-raised-lg);
  --shadow-key:  var(--shadow-raised);

  --font: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --sidebar-w: 252px;
  --sidebar-w-collapsed: 80px;
  --transition: 200ms ease;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image: radial-gradient(140% 120% at 0% 0%, #f1eefb 0%, #e7e3f3 45%, #ddd8ee 100%);
  background-attachment: fixed;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 .5rem; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 .75rem; }

/* ---- Utilities ---- */

.mono { font-variant-numeric: tabular-nums; letter-spacing: 0; }
.muted { color: var(--ink-mute); }

/* Small pressed pill for inline labels (e.g. the "admin" marker). */
.badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: .4rem;
  padding: .15rem .55rem;
  border-radius: var(--r-pill);
  background: var(--bg-deep);
  box-shadow: var(--shadow-inset-sm);
  color: var(--ink-mute);
  font-size: .62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.right { text-align: right; }
.center { text-align: center; }
.mt { margin-top: 1rem; }
.mb { margin-bottom: 1rem; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }

/* Neumorphic building blocks for new markup */
.raised {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-raised);
}
.inset, .well {
  background: var(--bg-deep);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-inset);
}

/* ============================================================
   Landing (public)
   ============================================================ */

.landing {
  max-width: 1040px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 5rem;
}

.landing-hero { text-align: center; }

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 2.5rem;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.landing-brand:hover { text-decoration: none; color: var(--ink); }
.landing-brand .brand-mark { width: 32px; height: 32px; font-size: .9rem; border-radius: var(--r-sm); }

.landing h1 {
  font-size: 3.5rem;
  margin: 0 0 1rem;
  letter-spacing: -0.035em;
  font-weight: 700;
  line-height: 1.02;
  background: linear-gradient(165deg, var(--ink) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-pitch {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0 auto;
  line-height: 1.55;
}

.landing .cta {
  margin-top: 2.25rem;
  display: flex;
  justify-content: center;
  gap: .85rem;
  flex-wrap: wrap;
}

/* Workflow steps */
.landing-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 5rem;
}

.landing-step {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-raised);
  padding: 1.9rem 1.6rem 1.7rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  overflow: hidden;
}

.landing-step-num {
  position: absolute;
  top: 1.6rem;
  right: 1.6rem;
  font-variant-numeric: tabular-nums;
  font-size: .75rem;
  font-weight: 700;
  color: var(--ink-faint);
  letter-spacing: .08em;
}

.landing-step-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-raised-sm);
  margin-bottom: 1rem;
}
.landing-step-icon svg { width: 24px; height: 24px; }

.landing-step h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 .25rem;
  letter-spacing: -0.01em;
}
.landing-step p {
  font-size: .95rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
}

/* Closing CTA */
.landing-closing {
  margin-top: 5rem;
  padding: 3.25rem 1.5rem 3rem;
  text-align: center;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-raised-lg);
}
.landing-closing h2 {
  font-size: 1.85rem;
  letter-spacing: -0.025em;
  margin: 0 0 .5rem;
}
.landing-closing p {
  color: var(--ink-soft);
  max-width: 48ch;
  margin: 0 auto;
  font-size: 1.02rem;
}
.landing-closing .cta { margin-top: 1.75rem; display: flex; justify-content: center; gap: .85rem; flex-wrap: wrap; }

/* ============================================================
   App shell — sidebar + main (one continuous surface)
   ============================================================ */

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  transition: grid-template-columns var(--transition);
}
html.sidebar-collapsed .app-shell { grid-template-columns: var(--sidebar-w-collapsed) 1fr; }

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  background: transparent;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 50;
}

/* Mobile drawer */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(40, 32, 80, 0.40);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.app-mobile-bar {
  display: none;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  background: transparent;
  height: 58px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.app-mobile-bar-title { font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.mobile-menu-btn {
  background: transparent;
  color: var(--ink);
  border: none;
  padding: .45rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow var(--transition), background var(--transition);
}
.mobile-menu-btn:hover { background: var(--surface); box-shadow: var(--shadow-raised-sm); }

/* Sidebar header */
.sidebar-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 1.1rem 1.1rem;
  height: 72px;
}
html.sidebar-collapsed .sidebar-header {
  padding: 1.1rem 0;
  justify-content: center;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  letter-spacing: -0.02em;
  min-width: 0;
  overflow: hidden;
}
.app-brand:hover { text-decoration: none; }
html.sidebar-collapsed .app-brand { display: none; }

.brand-mark {
  display: inline-flex;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  background: var(--grad-primary);
  color: white;
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-raised-sm), var(--inner-lip);
}
.brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-toggle {
  background: transparent;
  color: var(--ink-mute);
  border: none;
  padding: .45rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  flex-shrink: 0;
  transition: box-shadow var(--transition), color var(--transition), background var(--transition);
}
.sidebar-toggle:hover { background: var(--surface); box-shadow: var(--shadow-raised-sm); color: var(--ink); }
html.sidebar-collapsed .sidebar-toggle { margin-left: 0; }

/* Sidebar nav */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1rem .75rem;
  flex: 1;
  overflow-y: auto;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .7rem .85rem;
  border-radius: var(--r-md);
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.sidebar-nav a:hover {
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-raised-sm);
}
.sidebar-nav a.active {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-raised-sm), var(--inner-lip);
}
.sidebar-nav a.active:hover { color: #fff; }
.sidebar-nav .nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.sidebar-nav .nav-icon svg { width: 20px; height: 20px; }
.nav-label { overflow: hidden; text-overflow: ellipsis; }
html.sidebar-collapsed .sidebar-nav a { justify-content: center; padding-left: 0; padding-right: 0; }
html.sidebar-collapsed .nav-label { display: none; }

/* Sidebar footer */
.sidebar-footer {
  padding: 1rem .75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.footer-user {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .5rem .75rem;
  color: var(--ink-soft);
  font-size: .85rem;
  white-space: nowrap;
  overflow: hidden;
}
.footer-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .8rem;
  flex-shrink: 0;
  text-transform: uppercase;
  box-shadow: var(--shadow-raised-sm);
}
.footer-text { overflow: hidden; text-overflow: ellipsis; }
html.sidebar-collapsed .footer-text { display: none; }
html.sidebar-collapsed .footer-user { justify-content: center; padding: .5rem 0; }
html.sidebar-collapsed .sidebar-signout { justify-content: center; padding: .55rem 0; }

.sidebar-signout-form { margin: 0; }
.sidebar-signout {
  background: transparent;
  color: var(--ink-mute);
  border: none;
  padding: .6rem .85rem;
  border-radius: var(--r-md);
  width: 100%;
  display: flex;
  align-items: center;
  gap: .8rem;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  font-size: 14px;
  box-shadow: none;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.sidebar-signout:hover { background: var(--neg-soft); color: var(--neg); box-shadow: var(--shadow-inset-sm); }

/* ---- Main area ---- */

.app-main { min-width: 0; }
.app-main-inner {
  max-width: 1200px;
  padding: 2.25rem 2.5rem 4rem;
  margin: 0 auto;
}

/* ============================================================
   Page header
   ============================================================ */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-header > div { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.page-header h1 { margin: 0; }
.page-header h2 { margin: 0; }

/* ============================================================
   Cards
   ============================================================ */

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-raised);
  padding: 1.6rem 1.75rem;
  margin-bottom: 1.5rem;
}
.card h2 { font-size: 1.1rem; font-weight: 600; margin: 0 0 1rem; letter-spacing: -0.005em; }
.card > h2 + .page-header { margin-top: -.5rem; }
.card p:last-child { margin-bottom: 0; }

/* Auth card — login/signup and narrow form cards */
.auth-card,
.card.auth-card,
.auth-card.card {
  max-width: 460px;
  margin: 4rem auto;
  padding: 2.25rem 2.25rem;
}
.auth-card h1 {
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
  letter-spacing: -0.025em;
}

/* ============================================================
   Stats
   ============================================================ */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.stat {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-raised);
  padding: 1.25rem 1.5rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.stat-label {
  color: var(--ink-mute);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 600;
}
.stat-value {
  font-variant-numeric: tabular-nums;
  font-size: 1.9rem;
  font-weight: 700;
  margin-top: .25rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}
.stat-value.pos { color: var(--pos); }
.stat-value.neg { color: var(--neg); }

/* ============================================================
   Tables
   ============================================================ */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-md);
}
table.records {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}
table.records th,
table.records td {
  text-align: left;
  padding: .85rem .9rem;
  border-bottom: 1px solid var(--hairline);
  font-size: 14px;
  vertical-align: middle;
}
table.records th {
  font-size: .7rem;
  text-transform: uppercase;
  color: var(--ink-mute);
  letter-spacing: .12em;
  font-weight: 600;
  background: transparent;
  padding-top: .55rem;
  padding-bottom: .55rem;
}
table.records tbody tr { transition: background var(--transition); }
table.records tbody tr:hover { background: var(--surface-tint); }
table.records tbody tr:last-child td { border-bottom: none; }
/* Amounts and dates are numeric — tabular figures, right-aligned */
table.records td.right,
table.records th.right { text-align: right; }
table.records td.right {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
table.records td.right:has(.btn) { font-weight: inherit; }

/* ============================================================
   Forms
   ============================================================ */

form .field { margin-bottom: 1.1rem; }
form label {
  display: block;
  font-size: .72rem;
  color: var(--ink-mute);
  margin-bottom: .45rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
form input[type=text],
form input[type=email],
form input[type=password],
form input[type=date],
form input[type=number],
form input[type=file],
form input[type=search],
form input[type=tel],
form input[type=url],
form select,
form textarea {
  width: 100%;
  max-width: 480px;
  padding: .75rem 1rem;
  border: 0;
  border-radius: var(--r-md);
  font: inherit;
  font-size: 14.5px;
  background: var(--input-bg);
  color: var(--ink-soft);
  box-shadow: var(--shadow-inset-sm);
  transition: box-shadow var(--transition);
}
/* Custom select chevron (no native border to lean on) */
form select {
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--input-bg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b89a3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right .95rem center;
  background-size: 15px;
  padding-right: 2.5rem;
}
form input[type=color] {
  width: 58px;
  height: 44px;
  padding: 5px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--input-bg);
  cursor: pointer;
  box-shadow: var(--shadow-inset-sm);
}
form input[type=file] {
  padding: .6rem 1rem;
  cursor: pointer;
}
form input[type=file]::file-selector-button {
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  margin-right: .85rem;
  padding: .45rem .9rem;
  border: 0;
  border-radius: var(--r-sm);
  color: #fff;
  background: var(--grad-primary);
  cursor: pointer;
  box-shadow: var(--shadow-raised-sm), var(--inner-lip);
}
form input::placeholder,
form textarea::placeholder { color: var(--ink-faint); }
form input:focus, form select:focus, form textarea:focus {
  outline: none;
  box-shadow: var(--shadow-inset-sm), 0 0 0 3px rgba(107, 92, 232, 0.22);
}
form textarea { min-height: 96px; resize: vertical; }

/* Inline checkbox / radio labels (not the uppercase block labels) */
form input[type=checkbox],
form input[type=radio] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  cursor: pointer;
}
form label.checkbox,
form label.radio {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 0;
  cursor: pointer;
}

form .actions {
  margin-top: 1.4rem;
  display: flex;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ============================================================
   Buttons
   ============================================================ */

input[type=submit],
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  height: 46px;
  padding: 0 1.4rem;
  border: 0;
  border-radius: var(--r-md);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .005em;
  color: #fff;
  background: var(--grad-primary);
  box-shadow: var(--shadow-raised-sm), var(--inner-lip);
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
input[type=submit]:hover,
.btn:hover {
  text-decoration: none;
  color: #fff;
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: var(--shadow-raised), var(--inner-lip);
}
input[type=submit]:active,
.btn:active {
  transform: translateY(1px);
  filter: brightness(.99);
  box-shadow: var(--shadow-raised-sm);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-raised-sm);
}
.btn-secondary:hover {
  color: var(--ink);
  filter: none;
  background: var(--surface);
  box-shadow: var(--shadow-raised);
  transform: translateY(-1px);
}
.btn-secondary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-inset-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  box-shadow: none;
}
.btn-ghost:hover {
  color: var(--ink);
  filter: none;
  transform: none;
  background: var(--surface);
  box-shadow: var(--shadow-raised-sm);
}
.btn-ghost:active { box-shadow: var(--shadow-inset-sm); }

.btn-danger {
  background: var(--grad-danger);
  color: #fff;
  box-shadow: var(--shadow-raised-sm), var(--inner-lip);
}
.btn-danger:hover {
  color: #fff;
  filter: brightness(1.05);
  box-shadow: var(--shadow-raised), var(--inner-lip);
}

.btn-sm {
  height: 36px;
  padding: 0 .95rem;
  font-size: 13px;
  border-radius: var(--r-sm);
}

/* Generic <button> not styled as .btn (e.g. mobile menu) */
button { font: inherit; }

/* button_to wraps the <button> in a <form>; keep inline so action
   buttons sit side-by-side in cells, headers and toolbars. */
table.records form,
.page-header form,
.actions form { display: inline-block; margin: 0; }

/* ============================================================
   Flash messages
   ============================================================ */

.flash {
  padding: .9rem 1.2rem;
  border-radius: var(--r-md);
  margin-bottom: 1rem;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-raised-sm);
}
.flash-notice {
  background: var(--pos-soft);
  color: var(--primary-deep);
}
.flash-alert {
  background: var(--neg-soft);
  color: var(--neg-ink);
}

/* ============================================================
   Errors
   ============================================================ */

.errors {
  background: var(--neg-soft);
  color: var(--neg-ink);
  box-shadow: var(--shadow-inset-sm);
  padding: .9rem 1.2rem;
  border-radius: var(--r-md);
  margin-bottom: 1.25rem;
  font-size: 14px;
}
.errors ul { margin: 0; padding-left: 1.25rem; }
.errors li + li { margin-top: .15rem; }

/* ============================================================
   Filters
   ============================================================ */

.filters {
  display: flex;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
}
.filters .field { margin: 0; }
.filters input, .filters select { max-width: 220px; }

/* ============================================================
   Bars (spending-by-category) and color swatches
   ============================================================ */

.bar-row {
  display: grid;
  grid-template-columns: 180px 1fr 110px;
  gap: 1rem;
  align-items: center;
  padding: .6rem 0;
}
.bar-row + .bar-row { border-top: 1px solid var(--hairline); }
.bar {
  height: 12px;
  background: var(--bg-deep);
  border-radius: var(--r-pill);
  overflow: hidden;
  box-shadow: var(--shadow-inset-sm);
}
.bar > span {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.bar-row .right {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 13.5px;
}

.swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 4px;
  vertical-align: middle;
  margin-right: .5rem;
  box-shadow: inset 0 0 0 1px rgba(54, 54, 63, .06);
}

/* A category rendered as a link to its filtered transactions. Reads as plain
   text until hovered, so it doesn't shout "link" in dense tables and bars. */
.cat-link {
  color: inherit;
  text-decoration: none;
  border-radius: var(--r-xs);
}
.cat-link:hover { color: var(--accent); text-decoration: underline; }
.cat-link + .cat-link { margin-left: .5rem; }

/* ============================================================
   Nested form: line items (Expense)
   ============================================================ */

.line-items {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: 1.1rem;
  border-radius: var(--r-md);
  background: var(--bg-deep);
  box-shadow: var(--shadow-inset);
}
.line-item {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: .7rem;
  align-items: end;
  padding: .9rem 1rem;
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-raised-sm);
}
.line-item .field { margin: 0; }
.line-item.removed { display: none; }
.line-item-remove {
  height: 40px;
  padding: 0 .95rem;
  border-radius: var(--r-sm);
  border: 0;
  background: var(--surface);
  color: var(--neg);
  box-shadow: var(--shadow-raised-sm);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow var(--transition), background var(--transition);
}
.line-item-remove:hover { background: var(--neg-soft); box-shadow: var(--shadow-inset-sm); }

/* ============================================================
   Receipts
   ============================================================ */

.receipt-preview {
  max-width: 280px;
  max-height: 280px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-raised);
}

/* ============================================================
   Dashboard overview tabs
   ============================================================ */

.overview { min-height: 320px; }

.overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1.25rem;
}

.overview-tabs {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 5px;
  gap: 3px;
  background: var(--bg-deep);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-inset-sm);
  max-width: 100%;
}

.overview-tab {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 1.1rem;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-mute);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.overview-tab:hover { color: var(--ink); text-decoration: none; }
.overview-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-raised-sm);
}

/* Custom tab: pill that also contains inline edit/delete affordances */
.overview-tab-group {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  height: 34px;
  padding: 0 4px 0 0;
  border-radius: var(--r-pill);
  transition: background var(--transition), box-shadow var(--transition);
}
.overview-tab-group.active {
  background: var(--surface);
  box-shadow: var(--shadow-raised-sm);
}
.overview-tab-group .overview-tab.custom {
  background: transparent;
  box-shadow: none;
  padding-right: .5rem;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.overview-tab-group .overview-tab.custom .overview-tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-tab-action,
.overview-tab-action-form button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  text-decoration: none;
  box-shadow: none;
  transition: background var(--transition), color var(--transition), opacity var(--transition);
}
.overview-tab-action-form { margin: 0; display: inline-flex; }
.overview-tab-action:hover,
.overview-tab-action-form button:hover {
  background: var(--surface-tint);
  color: var(--primary);
  text-decoration: none;
}
.overview-tab-action-form button:hover { color: var(--neg); background: var(--neg-soft); }
.overview-tab-group:hover .overview-tab-action,
.overview-tab-group:hover .overview-tab-action-form button,
.overview-tab-group.active .overview-tab-action,
.overview-tab-group.active .overview-tab-action-form button,
.overview-tab-group:focus-within .overview-tab-action,
.overview-tab-group:focus-within .overview-tab-action-form button {
  opacity: 1;
  pointer-events: auto;
}

/* Plus button */
.overview-tab-add-form { margin: 0; display: inline-flex; }
.overview-tab-add {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.overview-tab-add:hover {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-raised-sm);
}

.overview-panel[hidden] { display: none; }

/* Custom-tab content */
.dashboard-tab-form { max-width: 560px; }
.dashboard-tab-form .field { margin-bottom: 1rem; }
.dashboard-tab-form .actions { margin-top: 1rem; }
.dashboard-tab-display h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -.005em;
  margin: 0 0 .5rem;
}
.dashboard-tab-prompt {
  font-size: 14px;
  color: var(--ink-soft);
  background: var(--bg-deep);
  padding: 1rem 1.15rem;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-inset-sm);
  margin-bottom: 1rem;
}
.muted.small { font-size: .8rem; }

/* ============================================================
   Wealth chart
   ============================================================ */

.wealth-chart { display: flex; flex-direction: column; gap: 1rem; flex: 1; }

.wealth-chart-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.wealth-chart-summary {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.wealth-chart-stat { display: flex; flex-direction: column; gap: .15rem; }
.wealth-chart-stat-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-mute);
  font-weight: 600;
}
.wealth-chart-stat-value {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.wealth-chart-ranges {
  display: inline-flex;
  padding: 5px;
  gap: 3px;
  background: var(--bg-deep);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-inset-sm);
}
.wealth-chart-range {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  min-width: 42px;
  padding: 0 .7rem;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -.005em;
  color: var(--ink-mute);
  text-decoration: none;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.wealth-chart-range:hover { color: var(--ink); text-decoration: none; }
.wealth-chart-range.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-raised-sm);
}

.wealth-chart-plot { width: 100%; }
.wealth-chart-svg { width: 100%; height: 240px; display: block; }

.wc-grid {
  stroke: var(--hairline);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}
.wc-axis-y, .wc-axis-x {
  fill: var(--ink-mute);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.wc-area.wc-income {
  fill: var(--primary-tint);
  opacity: 0.85;
}
.wc-line.wc-income-line {
  stroke: var(--primary);
  stroke-width: 2.5;
  stroke-linejoin: round;
}
.wc-area.wc-expense {
  fill: rgba(236, 79, 48, 0.14);
}
.wc-line.wc-expense-line {
  stroke: var(--neg);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-dasharray: none;
}

.wealth-chart-legend {
  display: flex;
  gap: 1.25rem;
  font-size: 12px;
  color: var(--ink-soft);
}
.wealth-chart-legend-item { display: inline-flex; align-items: center; gap: .5rem; }
.wc-swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}
.wc-swatch.income {
  background: var(--primary-tint);
  box-shadow: inset 0 0 0 2px var(--primary);
}
.wc-swatch.expense {
  background: rgba(236, 79, 48, 0.14);
  box-shadow: inset 0 0 0 2px var(--neg);
}

/* ============================================================
   Inbox
   ============================================================ */

.inbox-card { box-shadow: var(--shadow-raised), inset 4px 0 0 var(--warn); }
.inbox-card > .page-header { margin-bottom: .5rem; }
.inbox-card > .page-header h2 { font-size: 1.1rem; }
.inbox-count {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 600;
  background: var(--warn-soft);
  color: var(--warn-ink);
  padding: .2rem .6rem;
  border-radius: var(--r-pill);
  margin-left: .5rem;
}

.inbox-rows { display: flex; flex-direction: column; gap: .7rem; margin-top: .85rem; }

.inbox-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: .75rem;
  align-items: center;
  padding: .8rem .95rem;
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-raised-sm);
  transition: box-shadow var(--transition);
}
.inbox-row:hover { box-shadow: var(--shadow-raised); }

.inbox-kind {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  padding: .25rem .6rem;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.inbox-kind-expense { background: var(--neg-soft); color: var(--neg-ink); }
.inbox-kind-income  { background: var(--pos-soft); color: var(--primary-deep); }

.inbox-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: baseline;
  min-width: 0;
}
.inbox-meta .inbox-date { font-size: .85rem; color: var(--ink-soft); }
.inbox-meta .inbox-amount { font-size: 1rem; font-weight: 700; }
.inbox-meta .inbox-notes {
  font-size: .9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

/* AI / categorize states inside an inbox row */
.inbox-ai-status { font-size: .85rem; }
.inbox-ai-pending,
.inbox-ai-failed { display: inline-flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.inbox-line-items { display: flex; flex-direction: column; gap: .5rem; }
.inbox-line-item { display: inline-flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.inbox-li-desc { font-size: .9rem; }
.inbox-li-amount { font-weight: 600; font-variant-numeric: tabular-nums; }

.inbox-categorize-form {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
}
.inbox-categorize-form select.inbox-category-select {
  width: auto;
  min-width: 140px;
  height: 38px;
  padding: .35rem 2.2rem .35rem .75rem;
  font-size: 13.5px;
}
.inbox-categorize-form input[type=submit] {
  height: 38px;
  padding: 0 .95rem;
  font-size: 13px;
}

.inbox-discard {
  height: 38px;
  padding: 0 .85rem;
  font-size: 13px;
}

/* ============================================================
   Modal dialog
   ============================================================ */

dialog.modal {
  border: none;
  padding: 0;
  background: transparent;
  border-radius: var(--r-lg);
  max-width: 480px;
  width: calc(100% - 2rem);
  color: var(--ink-soft);
}
dialog.modal::backdrop {
  background: rgba(40, 32, 80, 0.40);
  backdrop-filter: blur(3px);
}
dialog.modal[open] { animation: modal-pop 180ms ease-out; }
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-raised-lg);
  padding: 1.6rem 1.6rem 1.35rem;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.modal-header h2 { margin: 0; font-size: 1.15rem; }
.modal-close {
  background: transparent;
  border: none;
  color: var(--ink-mute);
  cursor: pointer;
  padding: .4rem;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.modal-close:hover { background: var(--surface); box-shadow: var(--shadow-raised-sm); color: var(--ink); }

.inbox-capture-form .field { margin-bottom: .9rem; }
.inbox-capture-form input[type=text],
.inbox-capture-form input[type=date],
.inbox-capture-form select { max-width: 100%; }

/* Segmented control (expense / income toggle) */
.inbox-kind-toggle {
  display: inline-flex;
  gap: 0;
  border: 0;
  border-radius: var(--r-pill);
  padding: 4px;
  background: var(--bg-deep);
  box-shadow: var(--shadow-inset-sm);
}
.inbox-kind-option {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
  color: var(--ink-mute);
  font-size: 13.5px;
  font-weight: 600;
}
.inbox-kind-option input[type=radio] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.inbox-kind-option span {
  padding: .45rem 1.1rem;
  border-radius: var(--r-pill);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.inbox-kind-option:has(input:checked) { color: var(--primary); }
.inbox-kind-option:has(input:checked) span {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-raised-sm);
}

@media (max-width: 720px) {
  .inbox-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .inbox-categorize-form {
    display: flex;
    flex-wrap: wrap;
  }
  .inbox-categorize-form select.inbox-category-select { flex: 1; min-width: 0; }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 720px) {
  .app-shell,
  html.sidebar-collapsed .app-shell { grid-template-columns: 1fr; }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    height: 100dvh;
    background: var(--bg);
    transform: translateX(-100%);
    transition: transform 220ms ease;
    box-shadow: 12px 0 40px rgba(58, 43, 176, .18);
  }
  html.sidebar-open .app-sidebar { transform: translateX(0); }
  .sidebar-backdrop { display: block; }
  html.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }

  /* Inside the drawer, always show full labels */
  .app-brand, .nav-label, .footer-text { display: revert; }
  .sidebar-header { padding: 1.1rem 1.1rem; justify-content: flex-start; }
  .sidebar-toggle { margin-left: auto; }
  .sidebar-nav a { justify-content: flex-start; padding: .7rem .85rem; }
  .footer-user { justify-content: flex-start; padding: .5rem .75rem; }
  .sidebar-signout { justify-content: flex-start; padding: .6rem .85rem; }

  .app-mobile-bar { display: flex; }
  .app-main-inner { padding: 1.5rem 1.15rem 3rem; }
  .auth-card { margin: 2rem auto; padding: 1.75rem 1.4rem; }

  .line-item { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 1fr; }
  .bar-row .right { text-align: left; }

  table.records { min-width: 540px; }

  h1 { font-size: 1.5rem; }
  .stat-value { font-size: 1.6rem; }
  .landing { padding: 2.5rem 1.25rem 3rem; }
  .landing h1 { font-size: 2.35rem; }
  .landing-pitch { font-size: 1.02rem; }
  .landing-steps {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 3rem;
  }
  .landing-step { padding: 1.5rem 1.35rem 1.4rem; }
  .landing-closing { margin-top: 3rem; padding: 2.5rem 1.35rem 2.25rem; }
  .landing-closing h2 { font-size: 1.45rem; }
}

@media (min-width: 721px) and (max-width: 960px) {
  .landing h1 { font-size: 3rem; }
  .landing-steps { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Landing page v2 (.lp) — elaborate marketing surface.
   Built entirely from the neumorphic tokens above: raised =
   surface + shadow-raised, pressed = bg-deep + shadow-inset,
   accents via grad-primary / grad-danger. No borders.
   ============================================================ */

.lp {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.75rem 4rem;
}

/* ---- Top nav ---- */
.lp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .5rem .25rem;
  margin-bottom: 3.5rem;
}
.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.lp-brand:hover { text-decoration: none; color: var(--ink); }
.lp-nav-actions { display: inline-flex; align-items: center; gap: .6rem; }

/* ---- Hero ---- */
.lp-hero {
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 2rem;
}
.lp-hero-copy { min-width: 0; }

.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .85rem .4rem .7rem;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--shadow-raised-sm);
  color: var(--primary);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 1.5rem;
}
.lp-badge svg { width: 15px; height: 15px; }

.lp-hero h1 {
  font-size: 3.6rem;
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin: 0 0 1.1rem;
  background: linear-gradient(165deg, var(--ink) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lp-lead {
  font-size: 1.18rem;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 42ch;
  margin: 0;
}
.lp-cta { display: flex; gap: .85rem; flex-wrap: wrap; margin-top: 1.9rem; }
.lp-note {
  margin: 1.1rem 0 0;
  font-size: .85rem;
  color: var(--ink-mute);
  font-weight: 500;
}

/* ---- Hero "app window" mockup ---- */
.lp-window {
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-raised-lg);
  padding: .85rem;
  transform: rotate(.6deg);
  transition: transform var(--transition);
}
.lp-window:hover { transform: rotate(0deg); }
.lp-window-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .35rem .65rem .7rem;
}
.lp-dots { display: inline-flex; gap: .35rem; }
.lp-dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.lp-dots i:nth-child(1) { background: var(--primary-lite); }
.lp-dots i:nth-child(2) { background: var(--orange); }
.lp-dots i:nth-child(3) { background: var(--primary-soft); }
.lp-window-title { margin-left: auto; font-size: .78rem; color: var(--ink-mute); font-weight: 600; }

.lp-window-body {
  background: var(--bg-deep);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-inset);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.lp-mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin: 0; }
.lp-mini-stats .stat {
  padding: .7rem .8rem .8rem;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-raised-sm);
  gap: .1rem;
}
.lp-mini-stats .stat-label { font-size: .6rem; }
.lp-mini-stats .stat-value { font-size: 1.1rem; margin-top: .1rem; }

.lp-window-card {
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-raised-sm);
  padding: .85rem 1rem 1rem;
}
.lp-window-card-head {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  color: var(--ink-mute);
  margin-bottom: .5rem;
}
.lp-window-card .bar-row { grid-template-columns: 110px 1fr 52px; padding: .4rem 0; gap: .7rem; font-size: 13px; }
.lp-window-card .bar-row + .bar-row { border-top: none; }

/* ---- Section scaffolding ---- */
.lp-section { margin-top: 5.5rem; }
.lp-section-title {
  font-size: 2.1rem;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 .5rem;
}
.lp-section-sub {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0;
}
.lp-intro { text-align: center; }
.lp-intro .lp-section-sub { margin: 0 auto; }

/* ---- Feature rows (alternating) ---- */
.lp-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.25rem;
  align-items: center;
  margin-top: 5.5rem;
}
.lp-feature-reverse .lp-feature-copy { order: 2; }
.lp-feature-copy { min-width: 0; }

.lp-eyebrow {
  display: inline-block;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .75rem;
}
.lp-feature-copy h2 {
  font-size: 1.95rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 .85rem;
}
.lp-feature-copy > p {
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 1.4rem;
  max-width: 46ch;
}
.lp-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.lp-checks li {
  position: relative;
  padding-left: 2.1rem;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .98rem;
}
.lp-checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-tint);
  box-shadow: var(--shadow-raised-sm);
}
.lp-checks li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}

.lp-feature-visual { min-width: 0; }

/* Generic mockup card */
.lp-shot {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-raised);
  padding: 1.25rem 1.35rem;
}

/* ---- Telegram chat mockup ---- */
.lp-chat {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-raised);
  padding: 1rem 1.1rem 1.2rem;
  transform: rotate(-.5deg);
  transition: transform var(--transition);
}
.lp-chat:hover { transform: rotate(0deg); }
.lp-chat-head { display: flex; align-items: center; gap: .7rem; padding-bottom: .9rem; margin-bottom: .9rem; }
.lp-chat-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--grad-primary);
  box-shadow: var(--shadow-raised-sm), var(--inner-lip);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.lp-chat-avatar svg { width: 20px; height: 20px; }
.lp-chat-name { font-weight: 600; color: var(--ink); font-size: .95rem; }
.lp-chat-status { font-size: .78rem; color: var(--primary); font-weight: 500; }
.lp-chat-body { display: flex; flex-direction: column; gap: .55rem; }
.lp-bubble {
  max-width: 82%;
  padding: .55rem .8rem;
  border-radius: var(--r-md);
  font-size: .9rem;
  line-height: 1.4;
}
.lp-bubble.out {
  margin-left: auto;
  background: var(--grad-primary);
  color: #fff;
  border-bottom-right-radius: var(--r-xs);
  box-shadow: var(--shadow-raised-sm), var(--inner-lip);
}
.lp-bubble.in {
  margin-right: auto;
  background: var(--bg-deep);
  color: var(--ink-soft);
  border-bottom-left-radius: var(--r-xs);
  box-shadow: var(--shadow-inset-sm);
}
.lp-bubble-photo { display: inline-flex; align-items: center; gap: .55rem; }
.lp-photo-chip {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.22);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.lp-photo-chip svg { width: 17px; height: 17px; color: #fff; }
.lp-bubble-typing { animation: lp-pulse 1.6s ease-in-out infinite; }

/* ---- Inbox mockup ---- */
.lp-inbox-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; margin-bottom: .9rem; flex-wrap: wrap;
}
.lp-inbox-title { display: inline-flex; align-items: center; gap: .55rem; }
.lp-inbox-title strong { font-size: 1.05rem; color: var(--ink); font-weight: 600; }
.lp-inbox-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  padding: .7rem .8rem;
  border-radius: var(--r-md);
  background: var(--bg-deep);
  box-shadow: var(--shadow-inset-sm);
}
.lp-inbox-row + .lp-inbox-row { margin-top: .6rem; }
.lp-inbox-notes { flex: 1; min-width: 6ch; color: var(--ink-soft); font-size: .9rem; }
.lp-inbox-amount { font-weight: 600; font-size: .95rem; }
.lp-inbox-pick {
  font-size: .8rem;
  color: var(--ink-mute);
  background: var(--input-bg);
  box-shadow: var(--shadow-raised-sm);
  padding: .3rem .6rem;
  border-radius: var(--r-sm);
  white-space: nowrap;
}

/* ---- Wealth chart mockup ---- */
.lp-chartcard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .35rem; }
.lp-chartcard-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--ink-mute); }
.lp-chartcard-value { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.lp-legend { display: flex; gap: .9rem; font-size: .78rem; color: var(--ink-soft); padding-top: .3rem; }
.lp-legend-item { display: inline-flex; align-items: center; gap: .4rem; }
.lp-legend-swatch { width: 11px; height: 11px; border-radius: 3px; }
.lp-legend-swatch.income { background: var(--primary); }
.lp-legend-swatch.expense { background: var(--orange); }
.lp-spark { width: 100%; height: 175px; display: block; }
.lp-spark-sm { height: 110px; margin-top: .75rem; }
.lp-spark-area { stroke: none; }
.lp-spark-area.income { fill: var(--primary); opacity: .14; }
.lp-spark-area.expense { fill: var(--orange); opacity: .12; }
.lp-spark-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.lp-spark-line.income { stroke: var(--primary); }
.lp-spark-line.expense { stroke: var(--orange); }
.lp-spark-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--ink-faint); margin-top: .35rem; }

/* ---- Custom-tabs mockup ---- */
.lp-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--bg-deep);
  box-shadow: var(--shadow-inset);
  max-width: 100%;
  flex-wrap: wrap;
}
.lp-tab {
  display: inline-flex; align-items: center;
  height: 30px; padding: 0 .85rem;
  border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 600;
  color: var(--ink-mute);
}
.lp-tab.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-raised-sm); }
.lp-tab-custom { color: var(--primary); }
.lp-tab-custom::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary-lite); margin-right: .4rem;
}
.lp-tab-add { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-mute); font-weight: 700; }
.lp-prompt {
  display: flex; align-items: center; gap: .7rem;
  margin-top: 1rem;
  padding: .85rem 1rem;
  border-radius: var(--r-md);
  background: var(--input-bg);
  box-shadow: var(--shadow-inset-sm);
  color: var(--ink-soft);
  font-size: .95rem;
}
.lp-prompt svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; }

/* ---- Feature grid ---- */
.lp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.75rem; }
.lp-tile {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-raised);
  padding: 1.6rem 1.5rem;
}
.lp-tile-icon {
  width: 46px; height: 46px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-raised-sm);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.lp-tile-icon svg { width: 22px; height: 22px; }
.lp-tile h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 .35rem; color: var(--ink); }
.lp-tile p { font-size: .92rem; color: var(--ink-soft); line-height: 1.5; margin: 0; }

/* How-it-works steps reuse .landing-steps; tighten spacing under our heading */
.lp-section .landing-steps { margin-top: 2.75rem; }

/* ---- Footer ---- */
.lp-footer {
  margin-top: 5rem;
  padding-top: 2.5rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem 2rem;
  align-items: start;
}
.lp-footer-brand .lp-brand { margin-bottom: .6rem; }
.lp-footer-brand p { max-width: 40ch; font-size: .9rem; margin: 0; }
.lp-footer-links { display: flex; gap: 1.25rem; justify-content: flex-end; align-items: center; }
.lp-footer-links a { color: var(--ink-soft); font-weight: 500; font-size: .92rem; }
.lp-footer-rights { grid-column: 1 / -1; font-size: .82rem; margin: 1rem 0 0; }

@keyframes lp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
  .lp-bubble-typing { animation: none; }
  .lp-window, .lp-chat { transform: none; }
}

/* ---- Landing v2 responsive ---- */
@media (max-width: 860px) {
  .lp { padding: 1.25rem 1.25rem 3rem; }
  .lp-nav { margin-bottom: 2.25rem; }
  .lp-hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
  }
  .lp-hero h1 { font-size: 2.6rem; }
  .lp-lead { margin-left: auto; margin-right: auto; }
  .lp-cta { justify-content: center; }
  .lp-window { transform: none; max-width: 460px; margin: 0 auto; }
  .lp-chat { transform: none; }

  .lp-section { margin-top: 4rem; }
  .lp-feature {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    margin-top: 4rem;
  }
  .lp-feature-reverse .lp-feature-copy { order: 0; }
  .lp-feature-copy h2 { font-size: 1.6rem; }
  .lp-feature-copy > p { max-width: none; }
  .lp-section-title { font-size: 1.7rem; }

  .lp-grid { grid-template-columns: 1fr; gap: 1rem; }

  .lp-footer { grid-template-columns: 1fr; }
  .lp-footer-links { justify-content: flex-start; flex-wrap: wrap; }
}

@media (min-width: 861px) and (max-width: 1040px) {
  .lp-hero h1 { font-size: 3rem; }
  .lp-grid { grid-template-columns: 1fr 1fr; }
}

/* =====================================================================
   Investments — agentic OS demo (sources, mandates, agent feed, news)
   ===================================================================== */

.small { font-size: 0.8rem; }

.badge-attention {
  background: var(--warn-soft);
  color: var(--warn-ink);
}

/* ---- Connected systems ---- */
.source-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.source-card {
  padding: 1rem 1.1rem;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-raised-sm);
}
.source-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.source-provider {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.source-name { font-weight: 600; color: var(--ink); margin-top: .15rem; }
.source-value { font-size: 1.05rem; font-weight: 600; margin-top: .35rem; }
.source-meta { margin-top: .25rem; }
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--r-pill);
  display: inline-block;
  box-shadow: var(--shadow-inset-sm);
}
.status-dot.status-connected { background: var(--primary-lite); }
.status-dot.status-syncing   { background: var(--warn); }
.status-dot.status-error     { background: var(--neg); }

/* ---- Two-column layout ---- */
.invest-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.4rem;
  align-items: start;
}
.invest-grid > section { min-width: 0; }
@media (max-width: 1040px) {
  .invest-grid { grid-template-columns: 1fr; }
}

/* ---- Status / autonomy chips ---- */
.chip {
  display: inline-block;
  padding: .12rem .6rem;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .03em;
  background: var(--bg-deep);
  color: var(--ink-mute);
  box-shadow: var(--shadow-inset-sm);
  vertical-align: middle;
}
.chip-active   { background: var(--pos-soft);  color: var(--primary-deep); }
.chip-paused   { background: var(--warn-soft); color: var(--warn-ink); }
.chip-paper    { background: var(--primary-tint); color: var(--primary-deep); }
.chip-pending  { background: var(--warn-soft); color: var(--warn-ink); }
.chip-approved { background: var(--pos-soft);  color: var(--primary-deep); }
.chip-rejected { background: var(--neg-soft);  color: var(--neg-ink); }
.chip-autonomy { background: var(--primary-tint); color: var(--primary-deep); }

/* ---- Mandate cards ---- */
.mandate-card { margin-top: 1.4rem; }
.mandate-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .8rem;
}
.mandate-head h3 { margin: 0; font-size: 1rem; color: var(--ink); }
.mandate-intent {
  margin: .8rem 0;
  padding: .8rem 1rem;
  border-radius: var(--r-sm);
  background: var(--input-bg);
  box-shadow: var(--shadow-inset-sm);
  font-style: italic;
  color: var(--ink-soft);
}
.mandate-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .9rem;
  align-items: center;
}
.mandate-conditions {
  margin: .7rem 0 0;
  padding-left: 1.2rem;
  font-size: .85rem;
  color: var(--ink-soft);
}
.mandate-conditions li { margin-bottom: .2rem; }
.mandate-cap { margin-top: .9rem; }
.mandate-cap-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: .3rem;
}
.mandate-cap .bar > span { background: var(--grad-primary); }
.mandate-compiled { margin-top: .8rem; }
.mandate-compiled summary { cursor: pointer; }
.mandate-compiled pre {
  margin: .6rem 0 0;
  padding: .8rem 1rem;
  border-radius: var(--r-sm);
  background: var(--bg-deep);
  box-shadow: var(--shadow-inset-sm);
  overflow-x: auto;
  white-space: pre-wrap;
}
.mandate-form .actions { display: flex; align-items: center; gap: .9rem; }

/* ---- Agent activity feed ---- */
.feed { display: flex; flex-direction: column; }
.feed-item {
  display: flex;
  gap: .8rem;
  padding: .8rem 0;
}
.feed-item + .feed-item { border-top: 1px solid var(--hairline); }
.feed-icon {
  flex: 0 0 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--bg-deep);
  box-shadow: var(--shadow-inset-sm);
  font-size: 15px;
}
.feed-body { min-width: 0; }
.feed-title { font-weight: 600; color: var(--ink); font-size: .92rem; }
.feed-body p { margin: .25rem 0 0; }
.feed-meta { margin-top: .25rem; }
.feed-actions { margin-top: .55rem; display: flex; gap: .5rem; }

/* ---- News ---- */
.news-list { display: flex; flex-direction: column; }
.news-item { padding: .8rem 0; }
.news-item + .news-item { border-top: 1px solid var(--hairline); }
.news-meta {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .25rem;
}
.news-source {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.news-headline { font-weight: 600; color: var(--ink); font-size: .92rem; }
.news-item p { margin: .25rem 0 0; }
.sentiment {
  padding: .08rem .5rem;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
}
.sentiment-positive { background: var(--pos-soft);  color: var(--primary-deep); }
.sentiment-negative { background: var(--neg-soft);  color: var(--neg-ink); }
.sentiment-neutral  { background: var(--bg-deep);   color: var(--ink-mute); }
.news-symbols { margin-top: .35rem; display: flex; gap: .4rem; flex-wrap: wrap; }
.symbol-chip {
  padding: .08rem .5rem;
  border-radius: var(--r-pill);
  font-size: 11px;
  background: var(--primary-tint);
  color: var(--primary-deep);
}

/* ---- Investments Plus workspace ---- */
.invest-workspace {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}
.workspace-nav {
  position: sticky;
  top: 1rem;
  z-index: 5;
  display: flex;
  gap: .3rem;
  margin-bottom: 1.4rem;
  padding: .45rem;
  border-radius: var(--r-pill);
  background: var(--bg-deep);
  box-shadow: var(--shadow-inset-sm);
  overflow-x: auto;
}
.workspace-tab {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 .9rem;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-mute);
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.workspace-tab:hover { color: var(--ink); text-decoration: none; }
.workspace-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-raised-sm);
}
.tab-panel {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.tab-panel[hidden] { display: none; }
.workspace-section { margin-top: 2.2rem; scroll-margin-top: 5rem; }
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.section-head h2, .section-head h3 { margin-top: 0; }
.eyebrow {
  display: block;
  margin-bottom: .25rem;
  color: var(--ink-mute);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.flow-steps { display: grid; grid-template-columns: repeat(7, minmax(105px, 1fr)); gap: .65rem; overflow-x: auto; }
.flow-step { display: flex; align-items: center; gap: .55rem; min-width: 105px; padding: .7rem; border-radius: var(--r-sm); font-size: .75rem; }
.flow-number { display: grid; place-items: center; flex: 0 0 25px; height: 25px; border-radius: var(--r-pill); background: var(--grad-primary); color: #fff; font-weight: 700; }
.policy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1rem; }
.detail-list { display: grid; gap: .7rem; margin: 0; }
.detail-list > div { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .65rem .8rem; border-radius: var(--r-sm); background: var(--bg-deep); box-shadow: var(--shadow-inset-sm); }
.detail-list dt { color: var(--ink-mute); font-size: .78rem; }
.detail-list dd { margin: 0; font-weight: 600; text-align: right; }
.agent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 1.2rem; margin-bottom: 1.4rem; }
.agent-card { margin-bottom: 0; }
.agent-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: .7rem 0; }
.strategy-panel { margin-top: .8rem; padding: .8rem; border-radius: var(--r-sm); }
.strategy-panel p { margin: .45rem 0; font-size: .84rem; }
.run-history { margin-top: .8rem; }
.run-record { margin-top: .55rem; padding: .7rem .8rem; border-radius: var(--r-sm); }
.run-record p { margin: .35rem 0 0; overflow-wrap: anywhere; }
.message-list, .stack { display: grid; gap: .8rem; }
.message-exchange { padding: .8rem 1rem; border-radius: var(--r-sm); }
.message-exchange p { margin: .45rem 0 0; }
.review-card { box-shadow: var(--shadow-raised-lg); }
.decision-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1.2rem; margin: 1rem 0; }
.decision-grid > div { padding: .8rem; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-raised-sm); }
.decision-grid p { margin: .25rem 0 0; }
.exact-payload { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; padding: .8rem; border-radius: var(--r-sm); }
.exact-payload div { min-width: 0; }
.exact-payload dt { color: var(--ink-mute); font-size: .7rem; text-transform: uppercase; }
.exact-payload dd { margin: .2rem 0 0; font-size: .85rem; font-weight: 600; }
.guardrail-result { display: flex; align-items: center; gap: .7rem; margin-top: .8rem; padding: .7rem .8rem; border-radius: var(--r-sm); background: var(--pos-soft); color: var(--primary-deep); }
.guardrail-result.flagged { background: var(--warn-soft); color: var(--warn-ink); }
.review-actions { display: flex; align-items: center; gap: .8rem; margin-top: 1rem; }
.reject-form { display: flex; flex: 1; align-items: center; gap: .6rem; margin: 0; }
.reject-form input[type="text"] { flex: 1; }
.timeline { display: grid; gap: .25rem; }
.timeline-item { display: grid; grid-template-columns: 20px 1fr; gap: .6rem; padding: .65rem 0; }
.timeline-dot { width: 11px; height: 11px; margin-top: .35rem; border-radius: var(--r-pill); background: var(--primary-lite); box-shadow: var(--shadow-raised-sm); }
.timeline-item p { margin: .2rem 0; }
.goal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.goal-card .mandate-cap .bar > span { background: var(--grad-primary); }
.evaluation-card { margin-bottom: 0; }
.evidence { margin: .7rem 0; padding: .8rem; border-radius: var(--r-sm); }
.evidence p { margin: .3rem 0 0; }
.empty-state { text-align: center; padding: 2.5rem 1rem; }

@media (max-width: 760px) {
  .workspace-nav { top: .5rem; border-radius: var(--r-md); }
  .flow-steps { grid-template-columns: repeat(7, 130px); }
  .policy-grid, .decision-grid { grid-template-columns: 1fr; }
  .exact-payload { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-actions, .reject-form { align-items: stretch; flex-direction: column; }
}

/* ---- Investments landing (/investments) ---- */
.mandate-compiled-shot {
  margin: .8rem 0 0;
  padding: .9rem 1.1rem;
  border-radius: var(--r-sm);
  background: var(--bg-deep);
  box-shadow: var(--shadow-inset-sm);
  overflow-x: auto;
  white-space: pre;
}
.lp-shot .source-cards { margin-top: 0; }
.lp-window-card-head .chip { margin-left: .5rem; }
