/* =====================================================================
   SmartLedger Assistant — Phase 1 styles
   ---------------------------------------------------------------------
   Built on the approved Website 2.0 visual system: deep black surfaces,
   magenta -> violet gradient, dark translucent glass, Sora + Inter,
   the existing border / glow / focus language. Tokens fall back cleanly
   if this sheet loads before styles.css.

   Phase 1 is deterministic — no fake typing, no "thinking" delays,
   no attention-seeking animation, no auto-open.
   ===================================================================== */

.sla-root { font-family: var(--font-body, "Inter", system-ui, sans-serif); }

html.sla-lock { overflow: hidden; }

/* [hidden] must win over the display rules below (no global reset on this site) */
.sla-panel[hidden],
.sla-backdrop[hidden],
.sla-context[hidden],
.sla-eyebrow[hidden],
.sla-back[hidden],
.sla-menu[hidden],
.sla-restart[hidden] { display: none !important; }

/* =========================================================
   Launcher — restrained premium pill, distinct from the
   solid-gradient "Request a Consultation" CTA.
   ========================================================= */
.sla-launcher {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: .62em .95em .62em .62em;
  border-radius: 999px;
  font-family: var(--font-display, "Sora", system-ui, sans-serif);
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .005em;
  color: var(--ink-0, #fff);
  background:
    linear-gradient(var(--glass-bg-solid, #120a1c), var(--glass-bg-solid, #120a1c)) padding-box,
    linear-gradient(120deg, var(--magenta, #e83e8c), var(--violet, #7038e8)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 18px 44px -18px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .03) inset,
              0 0 34px -14px var(--glow-magenta, rgba(232, 105, 198, .34));
  transition: transform .2s cubic-bezier(.22, .61, .36, 1), box-shadow .2s;
}
.sla-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 52px -18px rgba(0, 0, 0, .75),
              0 0 40px -12px var(--glow-magenta, rgba(232, 105, 198, .4));
}
/* the main SmartLedger brandmark — icon only, no background disc */
.sla-mark {
  display: block;
  filter: drop-shadow(0 2px 6px rgba(232, 62, 140, .5));
}
.sla-launcher__orb {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: none;
}
.sla-launcher__orb .sla-mark { width: 24px; height: 24px; }
.sla-launcher__label { white-space: nowrap; }
.sla-root[data-open="true"] .sla-launcher { opacity: 0; pointer-events: none; }

/* =========================================================
   Backdrop + panel
   ========================================================= */
.sla-backdrop {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(4, 1, 8, .58);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
}
.sla-panel {
  position: fixed;
  z-index: 220;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  width: min(408px, calc(100vw - 28px));
  max-height: min(680px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--glass-brd-strong, rgba(255, 255, 255, .18));
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(112, 56, 232, .16), transparent 60%),
    var(--glass-bg-solid, #120a1c);
  color: var(--ink-1, #cbc6d4);
  box-shadow: 0 44px 100px -34px rgba(0, 0, 0, .82), inset 0 1px 0 rgba(255, 255, 255, .06);
}

/* header / identity */
.sla-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 12px 10px;
  border-bottom: 1px solid var(--glass-brd, rgba(255, 255, 255, .1));
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent);
}
.sla-identity {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sla-identity__orb {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
}
.sla-identity__orb .sla-mark { width: 26px; height: 26px; }
.sla-identity__text { display: flex; flex-direction: column; min-width: 0; }
.sla-identity__name {
  font-family: var(--font-display, "Sora", system-ui, sans-serif);
  font-weight: 600;
  font-size: .92rem;
  color: var(--ink-0, #fff);
  line-height: 1.2;
}
.sla-identity__desc {
  font-size: .72rem;
  color: var(--ink-2, #aaa4b3);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sla-back,
.sla-close {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--ink-1, #cbc6d4);
  border: 1px solid transparent;
  flex: none;
  transition: background .18s, color .18s;
}
.sla-back:hover,
.sla-close:hover { background: rgba(255, 255, 255, .09); color: #fff; }

/* body */
.sla-body {
  padding: 15px 16px 18px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}
.sla-eyebrow {
  font-family: var(--font-display, "Sora", system-ui, sans-serif);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--ink-3, rgba(203, 198, 212, .5));
  margin-bottom: 10px;
}
.sla-context {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.sla-context__label {
  font-size: .72rem;
  padding: .32em .72em;
  border-radius: 999px;
  border: 1px solid rgba(232, 62, 140, .38);
  background: rgba(232, 62, 140, .1);
  color: #fff;
}
.sla-context__change {
  font-size: .72rem;
  color: var(--pink, #ff5fae);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sla-screen-title {
  font-family: var(--font-display, "Sora", system-ui, sans-serif);
  font-size: 1.12rem;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--ink-0, #fff);
}
.sla-screen-title:focus { outline: none; }
.sla-screen-intro {
  margin-top: 9px;
  font-size: .875rem;
  line-height: 1.62;
  color: var(--ink-1, #cbc6d4);
}
.sla-screen-intro p + p,
.sla-screen-intro ul + p,
.sla-screen-intro p + ul { margin-top: .7em; }
.sla-screen-intro ul { margin: .55em 0 0; padding-left: 1.15em; list-style: disc; }
.sla-screen-intro li { margin: .3em 0; }
.sla-screen-intro strong { color: var(--ink-0, #fff); font-weight: 600; }

/* compact, scannable pricing summary */
.sla-price { display: grid; gap: 6px; margin: 12px 0 4px; }
.sla-price__row {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: baseline;
  padding: 10px 12px;
  border: 1px solid var(--glass-brd, rgba(255, 255, 255, .1));
  border-radius: 11px;
  background: rgba(255, 255, 255, .03);
}
.sla-price__amt {
  font-family: var(--font-display, "Sora", system-ui, sans-serif);
  font-weight: 600;
  font-size: .98rem;
  color: var(--ink-0, #fff);
  white-space: nowrap;
}
.sla-price__unit { font-size: .72rem; color: var(--ink-2, #aaa4b3); }
.sla-price__desc {
  grid-column: 1 / -1;
  font-size: .78rem;
  line-height: 1.45;
  color: var(--ink-1, #cbc6d4);
  margin-top: 3px;
}
.sla-price__plus {
  text-align: center;
  color: var(--ink-3, rgba(203, 198, 212, .5));
  font-size: .82rem;
  line-height: 1;
}

/* option buttons */
.sla-options { display: flex; flex-direction: column; gap: 9px; margin-top: 15px; }
.sla-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 13px;
  border: 1px solid var(--glass-brd, rgba(255, 255, 255, .1));
  background: rgba(255, 255, 255, .03);
  color: var(--ink-0, #fff);
  font-size: .88rem;
  line-height: 1.4;
  transition: background .18s, border-color .18s, transform .12s;
}
.sla-opt::after {
  content: "\203A";
  color: var(--ink-3, rgba(203, 198, 212, .5));
  font-size: 1.15em;
  line-height: 1;
  flex: none;
}
.sla-opt:hover { background: rgba(232, 62, 140, .1); border-color: rgba(232, 62, 140, .5); }
.sla-opt:active { transform: translateY(1px); }

/* premium cards (opening screen — label + microcopy) */
.sla-opt--card {
  position: relative;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  padding: 13px 15px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
}
.sla-opt--card::after { position: absolute; right: 14px; top: 14px; }
.sla-opt__t {
  font-family: var(--font-display, "Sora", system-ui, sans-serif);
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink-0, #fff);
  padding-right: 16px;
}
.sla-opt__s { font-size: .76rem; color: var(--ink-2, #aaa4b3); line-height: 1.35; }

/* destination + primary variants */
.sla-opt--go {
  border-color: rgba(154, 92, 255, .4);
  background: rgba(112, 56, 232, .12);
}
.sla-opt--go::after { content: "\2197"; }
.sla-opt--primary {
  justify-content: center;
  border: 0;
  color: #fff;
  font-family: var(--font-display, "Sora", system-ui, sans-serif);
  font-weight: 600;
  background: linear-gradient(120deg, var(--magenta, #e83e8c), var(--violet, #7038e8));
  box-shadow: 0 12px 30px -12px rgba(232, 62, 140, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.sla-opt--primary::after { content: "\2192"; color: rgba(255, 255, 255, .9); }
.sla-opt--primary:hover { filter: brightness(1.06); background: linear-gradient(120deg, var(--magenta, #e83e8c), var(--violet, #7038e8)); }

/* footer */
.sla-foot {
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--glass-brd, rgba(255, 255, 255, .1));
}
.sla-foot__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}
.sla-navlink {
  font-size: .78rem;
  color: var(--ink-2, #aaa4b3);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sla-navlink:hover { color: var(--ink-0, #fff); }
.sla-menu { color: var(--pink, #ff5fae); }
/* restrained persistent consultation access — a text link, never a gradient button */
.sla-navlink--accent { color: var(--pink, #ff5fae); font-weight: 600; }
.sla-navlink--accent::after { content: " \2192"; }
.sla-cta-contact { color: var(--ink-2, #aaa4b3); }
.sla-note {
  margin-top: 8px;
  font-size: .72rem;
  line-height: 1.5;
  color: var(--ink-2, #aaa4b3);
}

/* focus visibility — aligns with the site's pink focus ring */
.sla-opt:focus-visible,
.sla-launcher:focus-visible,
.sla-back:focus-visible,
.sla-close:focus-visible,
.sla-navlink:focus-visible,
.sla-context__change:focus-visible {
  outline: 2px solid var(--pink, #ff5fae);
  outline-offset: 3px;
  border-radius: 8px;
}

/* =========================================================
   Mobile — near-full-height sheet
   ========================================================= */
@media (max-width: 560px) {
  .sla-panel {
    inset: 0;
    width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    border: 0;
  }
  .sla-head { padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .sla-launcher { padding: .58em .9em .58em .58em; font-size: .86rem; }
  .sla-identity__desc { font-size: .7rem; }
}
@media (max-width: 360px) {
  .sla-launcher__label { display: none; }
  .sla-launcher { padding: .55em; }
}

/* =========================================================
   Motion — restrained, and fully disabled for reduced-motion
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  .sla-panel { animation: sla-in .24s cubic-bezier(.22, .61, .36, 1); }
  .sla-backdrop { animation: sla-fade .18s ease; }
  @keyframes sla-in {
    from { opacity: 0; transform: translateY(12px) scale(.99); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes sla-fade { from { opacity: 0; } to { opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  .sla-launcher, .sla-opt, .sla-panel, .sla-back, .sla-close { transition: none; }
}
