/* ===== Lexflow design tokens ===== */
:root {
  --brand: #2450e0; --brand-hi: #4a72f5; --brand-ink: #16328f; --tint: #e9eefe; --tint-2: #f3f6ff;
  --accent: #d9783f; --accent-ink: #8c3f14; --accent-tint: #fdeee4;
  --side: #0b1533; --side-hi: #13224f; --side-ink: #c2cff5;
  --bg: #f3f5fa; --surface: #ffffff; --raised: #ffffff; --soft: #f5f7fc;
  --on-ink: #ffffff; --grey: #eef1f6; --tint-hover: #dbe4fd; --note-bg: #fff8f3; --note-line: #f4d9c6; --ok-ink: #5a35b0; --topbar: rgba(243, 245, 250, .82); --lane: rgba(255, 255, 255, .55); --paper: #ffffff;
  --hair: #e6eaf4; --line: #d5dcec; --ink: #0f1730; --ink-2: #36405c; --muted: #6b7591;
  --ok: #7b4fd6; --ok-tint: #f0eafc; --warn: #c77d0a; --warn-tint: #fdf1dc; --bad: #d1435b; --bad-tint: #fde8ec;
  --sh: 0 1px 2px rgba(11, 21, 51, .04), 0 4px 16px rgba(11, 21, 51, .06);
  --sh-lift: 0 2px 6px rgba(11, 21, 51, .06), 0 18px 48px rgba(11, 21, 51, .14);
  --r: 16px; --r-sm: 10px; --r-lg: 24px;
  --display: 'Fraunces', Georgia, serif; --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; text-wrap: balance; letter-spacing: -.01em; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--brand); text-decoration: none; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.display { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 15px; height: 15px; } .ico.lg { width: 22px; height: 22px; } .ico.xl { width: 28px; height: 28px; }

/* ----- buttons ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: transform .12s, box-shadow .2s, background .2s, border-color .2s; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, var(--brand-hi), var(--brand)); color: #fff; box-shadow: 0 6px 18px rgba(36, 80, 224, .32), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(36, 80, 224, .4), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn-gold { background: linear-gradient(180deg, #ec9a68, var(--accent)); color: #2a1206; box-shadow: 0 6px 18px rgba(217, 120, 63, .35); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-dark { background: var(--ink); color: var(--on-ink); }
.btn-soft { background: var(--tint); color: var(--brand-ink); }
.btn-soft:hover { background: var(--tint-hover); }
.btn-danger { background: var(--bad-tint); color: var(--bad); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: 15.5px; border-radius: 14px; }
.btn-icon { width: 40px; padding: 0; }
.btn-block { width: 100%; }

/* ----- forms ----- */
.field { display: grid; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 12px; }
.input, .select, .textarea { width: 100%; min-height: 42px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; }
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(36, 80, 224, .12); }
.field.err .input, .field.err .select, .field.err .textarea { border-color: var(--bad); }
.field .msg { color: var(--bad); font-size: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); margin-top: 1px; }
:focus-visible { outline: 3px solid rgba(36, 80, 224, .45); outline-offset: 2px; }

/* ----- surfaces ----- */
.card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r); box-shadow: var(--sh); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--tint); color: var(--brand-ink); white-space: nowrap; }
.pill.gold { background: var(--accent-tint); color: var(--accent-ink); }
.pill.warn { background: var(--warn-tint); color: var(--warn); }
.pill.bad { background: var(--bad-tint); color: var(--bad); }
.pill.ok { background: var(--ok-tint); color: var(--ok); }
.pill.grey { background: var(--grey); color: var(--muted); }
.pill.dark { background: var(--ink); color: var(--on-ink); }
.eyebrow { font-size: 12px; font-weight: 700; color: var(--brand); letter-spacing: .02em; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: inherit; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-hi), var(--brand-ink)); color: #fff; box-shadow: 0 6px 16px rgba(36, 80, 224, .35), inset 0 1px 0 rgba(255,255,255,.25); }
.logo-mark .ico { width: 19px; height: 19px; }

/* ----- toast ----- */
.toasts { position: fixed; z-index: 200; right: 16px; bottom: 16px; display: grid; gap: 8px; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--on-ink); box-shadow: var(--sh-lift); font-weight: 500; animation: tIn .25s ease; max-width: 420px; }
.toast.bad { background: var(--bad); }
@keyframes tIn { from { opacity: 0; transform: translateY(8px); } }

/* ----- modal & sheet ----- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(9, 14, 34, .45); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(520px, 100%); max-height: calc(calc(100vh / var(--z)) - 32px); overflow: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-lift); padding: 28px; animation: pop .22s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px); } }
.overlay.sheet-wrap { place-items: stretch end; padding: 0; }
.sheet { width: min(520px, 100vw); height: 100%; background: var(--surface); box-shadow: var(--sh-lift); display: flex; flex-direction: column; animation: slide .25s cubic-bezier(.2, .9, .3, 1); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--hair); }
.sheet-head h3 { font-size: 18px; }
.sheet-body { padding: 20px 24px; overflow: auto; flex: 1; display: grid; gap: 14px; align-content: start; }
.sheet-foot { padding: 16px 24px; border-top: 1px solid var(--hair); display: flex; gap: 10px; justify-content: flex-end; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } .modal { padding: 22px; } }
.seg { display: inline-flex; padding: 4px; border-radius: 13px; background: var(--surface); border: 1px solid var(--hair); gap: 2px; }
.seg button { height: 32px; padding: 0 12px; border-radius: 9px; border: 0; background: none; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--ink); color: var(--on-ink); }
/* logo lockup: name with "By Anshora Ventures" beneath */
.logo-text { display: grid; line-height: 1.05; }
.logo-text small { font-size: 10.5px; font-weight: 600; letter-spacing: .01em; opacity: .62; margin-top: 2px; }

/* ===== Big-screen scaling =====
   Designed at 1440px. On larger monitors the whole UI scales up in steps instead of leaving
   wide empty margins. Media queries still use the real viewport, so phone/tablet rules are unaffected. */
/* --z mirrors the zoom so viewport-height sizes (vh) can be divided back to the real screen height */
:root { --z: 1; }
@media (min-width: 1680px) { html { zoom: 1.12; } :root { --z: 1.12; } }
@media (min-width: 1900px) { html { zoom: 1.25; } :root { --z: 1.25; } }
@media (min-width: 2200px) { html { zoom: 1.4; } :root { --z: 1.4; } }
@media (min-width: 2500px) { html { zoom: 1.6; } :root { --z: 1.6; } }
@media (min-width: 3200px) { html { zoom: 2; } :root { --z: 2; } }

/* ===== Lexflow logo ===== */
.logo-mark { background: linear-gradient(145deg, #1d3a8a, #0b1533) !important; color: #fff; box-shadow: 0 6px 16px rgba(11, 21, 51, .35), inset 0 0 0 1px rgba(255, 255, 255, .12) !important; }
.logo-mark .mark { width: 70%; height: 70%; }
.logo-text { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; font-size: 1.12em; }
.logo-text em { font-style: italic; color: var(--accent); font-weight: 600; }
.logo-text small { font-family: var(--sans); font-style: normal; }
.side .logo-text em, .logo.on-dark .logo-text em { color: #f6b48a; }
.mini-mark { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: #0b1533; color: #fff; }
.mini-mark .mark { width: 14px; height: 14px; }
