/*
 * Phone and small-tablet layout for the whole site. The pages are laid out with inline styles
 * for desktop; below 860px these rules stack every multi-column grid and shrink display type.
 * The header stays pinned to the top of the window; at 1260px and under its menu folds behind a
 * menu button and opens over the page (the button is added by /motion.js).
 */
html { -webkit-text-size-adjust: 100%; }
img { max-width: 100%; }
[hidden] { display: none !important; } /* inline display styles must not beat the hidden attribute */

@media (max-width: 860px) {
  /* stack grids; keep the small "number + text" and "label + arrow" rows side by side */
  [style*="grid-template-columns"]:not([style*="56px 1fr"]):not([style*="1fr auto"]) { grid-template-columns: minmax(0, 1fr) !important; }
  [style*="grid-column: span"] { grid-column: auto !important; }
  [style*="border-left: 1px solid #2A4468"] { border-left: 0 !important; border-top: 1px solid #2A4468; }

  body > div > div:first-child > span:first-child { display: none; } /* utility bar tagline */
  nav[aria-label="Utility"] { margin-left: auto; }

  /* type */
  h1[style] { font-size: clamp(32px, 9vw, 40px) !important; line-height: 1.12 !important; }
  h2[style] { font-size: clamp(26px, 7vw, 30px) !important; }
  [style*="font-size: 48px"], [style*="font-size: 52px"], [style*="font-size: 56px"], [style*="font-size: 64px"] { font-size: 36px !important; }
  p[style*="font-size: 20px"], p[style*="font-size: 19px"] { font-size: 17px !important; }

  /* spacing */
  section[style*="padding: 96px"], section[style*="padding: 112px"], section[style*="padding: 80px"] { padding-top: 56px !important; padding-bottom: 56px !important; }
  [style*="padding: 40px"] { padding: 24px !important; }
  [style*="gap: 48px"] { gap: 28px !important; }

  /* wide tables scroll inside themselves instead of widening the page */
  table { display: block; overflow-x: auto; max-width: 100%; }
  /* rows of links and buttons wrap instead of running off the screen (not the header, which has its own menu) */
  [style*="display: flex"]:has(> a):not(header):not(nav[aria-label="Main"]) { flex-wrap: wrap; }
  a[style*="padding: 14px 28px"] { flex: 1 1 auto; justify-content: center; text-align: center; max-width: 100%; }
}

/* Laptops (1261-1540px): the full menu in slightly smaller type, so it stays on one line. */
@media (min-width: 1261px) and (max-width: 1540px) {
  header[style] { gap: 16px !important; padding-left: 24px !important; padding-right: 24px !important; }
  nav[aria-label="Main"] { gap: 16px !important; font-size: 14px !important; }
  nav[aria-label="Main"] > a[href="/contact#callback"] { padding: 10px 16px !important; }
  .lep-mega { font-size: 15px; }
}
/* Small laptops (1101-1260px): the two-part hero grids stack. */
@media (min-width: 1101px) and (max-width: 1260px) {
  [style*="grid-template-columns: repeat(12, minmax(0, 1fr))"] > [style*="grid-column: span 7"],
  [style*="grid-template-columns: repeat(12, minmax(0, 1fr))"] > [style*="grid-column: span 5"] { grid-column: span 12 !important; }
}

/* Interest rates today, filled by /rates.js from the Bank of Canada. Hidden until it has numbers. */
.lep-rates { background: #071A33; color: #FFFFFF; padding: 28px clamp(24px, 5vw, 80px) 24px; }
.lep-rates-in { max-width: 1200px; margin: 0 auto; }
.lep-rates-eyebrow { display: block; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: #D89A2B; font-weight: 700; margin-bottom: 14px; }
.lep-rates-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px 32px; }
.lep-rate { display: flex; flex-direction: column; gap: 2px; border-left: 2px solid #2A4468; padding-left: 16px; }
.lep-rate-lead { border-left-color: #D89A2B; }
.lep-rate-label { font-size: 13px; color: #C9D3E0; }
.lep-rate-value { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 30px; line-height: 1.15; color: #FFFFFF; }
.lep-rate-lead .lep-rate-value { color: #D89A2B; }
.lep-rate-note { font-size: 12.5px; color: #8FA0B8; line-height: 1.5; }
.lep-rates-note { margin: 18px 0 0; font-size: 12.5px; color: #8FA0B8; }
.lep-rates-note a { color: #C9D3E0; }
@media (max-width: 700px) { .lep-rate-note { display: none; } }

/* The hero with the search beside it, and a section that starts closed (both on /lenders). */
/* the hero keeps the full padded width every other hero has: no centred column, so the
   headline starts where it does on every other page */
.lep-hero-split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 48px; align-items: start; }
@media (max-width: 900px) { .lep-hero-split { grid-template-columns: 1fr; gap: 32px; } }

.lep-fold { border: 1px solid #D9DEE5; background: #FFFFFF; }
.lep-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px clamp(18px, 3vw, 28px); }
.lep-fold > summary::-webkit-details-marker { display: none; }
.lep-fold > summary:hover, .lep-fold > summary:focus-visible { background: #F5F6F8; }
.lep-fold-h { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: clamp(22px, 3vw, 30px); line-height: 1.2; color: #0B2545; }
.lep-fold-toggle { flex: none; display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: #0B2545; }
.lep-fold-toggle::before { content: "Show"; }
.lep-fold[open] .lep-fold-toggle::before { content: "Hide"; }
.lep-fold-toggle::after { content: "\25be"; display: inline-block; font-size: 17px; line-height: 1; transition: transform .15s ease; }
.lep-fold[open] .lep-fold-toggle::after { transform: rotate(180deg); }
.lep-fold-body { padding: 0 clamp(18px, 3vw, 28px) 26px; }

nav[aria-label="Main"] > a { white-space: nowrap; }

/* ---------- The header stays at the top of the window. /motion.js keeps --lep-head at its height. ---------- */
header[style] { position: sticky; top: var(--lep-banner, 0px); z-index: 50; transition: box-shadow .2s ease; }
/* signed in: a thin strip pinned above the header (/account.js) */
.lep-banner { position: sticky; top: 0; z-index: 51; background: #3F7A52; color: #FFFFFF; font-size: 13px; line-height: 1.4; }
.lep-banner-in { display: flex; justify-content: space-between; align-items: center; gap: 6px 20px; flex-wrap: wrap; padding: 6px clamp(24px, 5vw, 80px); }
.lep-banner strong { font-weight: 700; }
.lep-banner a { color: #FFFFFF; font-weight: 700; text-decoration: none; white-space: nowrap; }
.lep-banner a:hover { text-decoration: underline; }
@media (max-width: 700px) { .lep-banner-more { display: none; } .lep-banner-in { padding-left: 16px; padding-right: 16px; } }
header.is-stuck { box-shadow: 0 6px 20px rgba(11, 37, 69, .08); }
html { scroll-padding-top: var(--lep-head, 76px); } /* links to #sections land below the header, not under it */
.calc-side { top: calc(var(--lep-head, 76px) + 16px) !important; }
@media (min-width: 1240px) { .pl-toc { top: calc(var(--lep-head, 76px) + 12px) !important; } }
.lep-menu-btn, .lep-menu-extra { display: none; }

/* ---------- 1260px and under: the menu sits behind a button and opens over the whole page. ---------- */
@media (max-width: 1260px) {
  header[style] { flex-wrap: nowrap; padding-top: 12px !important; padding-bottom: 12px !important; gap: 16px !important; }
  nav[aria-label="Main"] { display: none !important; }

  .lep-menu-btn { display: inline-flex; align-items: center; gap: 10px; flex: none; margin-left: auto; height: 44px; padding: 0 12px 0 14px;
    font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #0B2545;
    background: transparent; border: 1px solid #D9DEE5; cursor: pointer; }
  .lep-menu-btn:hover, .lep-menu-btn:focus-visible { border-color: #0B2545; }
  .lep-menu-icon { position: relative; width: 20px; height: 14px; }
  .lep-menu-icon span { position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease, top .2s ease; }
  .lep-menu-icon span:nth-child(1) { top: 0; }
  .lep-menu-icon span:nth-child(2) { top: 6px; }
  .lep-menu-icon span:nth-child(3) { top: 12px; }
  header.is-open .lep-menu-icon span:nth-child(1) { top: 6px; transform: rotate(45deg); }
  header.is-open .lep-menu-icon span:nth-child(2) { opacity: 0; }
  header.is-open .lep-menu-icon span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

  html.lep-menu-open { overflow: hidden; }
  header.is-open { box-shadow: none; }
  header.is-open nav[aria-label="Main"] { display: flex !important; flex-direction: column; align-items: stretch !important; justify-content: flex-start !important; gap: 0 !important; font-size: 16px !important;
    position: fixed; left: 0; right: 0; top: var(--lep-nav-top, 68px); bottom: 0; z-index: 49;
    padding: clamp(8px, 2.5vh, 32px) clamp(24px, 5vw, 80px) clamp(16px, 3vh, 32px); background: #0B2545; border-top: 3px solid #D89A2B;
    overflow-y: auto; overscroll-behavior: contain; animation: lepMenuIn .22s ease both; }
  header.is-open nav[aria-label="Main"] > a { color: #FFFFFF; font-family: "Fraunces", Georgia, serif; font-weight: 500; letter-spacing: .01em;
    font-size: clamp(19px, 3.2vh, 28px); line-height: 1.2; padding: clamp(7px, 1.45vh, 14px) 0 !important; border-bottom: 1px solid #2A4468 !important; }
  header.is-open nav[aria-label="Main"] > a:hover { color: #D89A2B; }
  header.is-open nav[aria-label="Main"] > a[style*="border-bottom: 2px solid #D89A2B"] { color: #D89A2B; } /* the page you are on */
  header.is-open nav[aria-label="Main"] > a[href="/contact#callback"] { margin-top: clamp(14px, 2.6vh, 28px); padding: 15px 20px !important; border: 0 !important;
    background: #D89A2B !important; color: #071A33 !important; font-family: "Manrope", system-ui, sans-serif; font-size: 16px; font-weight: 700; text-align: center; }
  /* the drop-down sections (nav.js) read as the same rows, and open in place beneath their heading */
  header.is-open nav[aria-label="Main"] > .lep-mega-t { display: flex; justify-content: space-between; width: 100%; text-align: left; color: #FFFFFF;
    font-family: "Fraunces", Georgia, serif; font-weight: 500; letter-spacing: .01em; font-size: clamp(19px, 3.2vh, 28px); line-height: 1.2;
    padding: clamp(7px, 1.45vh, 14px) 0 !important; border-bottom: 1px solid #2A4468 !important; }
  header.is-open nav[aria-label="Main"] > .lep-mega-t:hover, header.is-open nav[aria-label="Main"] > .lep-mega-t[aria-expanded="true"] { color: #D89A2B; }
  header.is-open nav[aria-label="Main"] > .lep-mega-t[style*="border-bottom: 2px solid #D89A2B"] { color: #D89A2B; }
  header.is-open .lep-mega-chev { width: 9px; height: 9px; border-width: 0 2px 2px 0; margin-right: 4px; }
  header.is-open nav[aria-label="Main"] > .lep-mega { position: static; flex: none; opacity: 1; transform: none; pointer-events: auto; animation: none;
    background: transparent; border: 0; border-bottom: 1px solid #2A4468; box-shadow: none; max-height: none; overflow: visible;
    padding: 4px 0 18px 16px; font-family: "Manrope", system-ui, sans-serif; font-weight: 500; }
  header.is-open .lep-mega-in { display: flex; flex-direction: column-reverse; gap: 14px; }
  header.is-open .lep-mega-intro { padding: 0; border: 0; }
  header.is-open .lep-mega-h, header.is-open .lep-mega-blurb { display: none; }
  header.is-open .lep-mega-all { color: #FFFFFF; font-size: 15px; }
  header.is-open .lep-mega-body { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 24px; }
  header.is-open .lep-mega-gh { margin-bottom: 4px; }
  header.is-open .lep-mega-list { columns: 1; }
  header.is-open .lep-mega-list a { color: #C9D3E0; font-size: 15px; padding: 6px 0; }
  header.is-open .lep-mega-list a:hover, header.is-open .lep-mega-list a:focus-visible { color: #FFFFFF; }
  header.is-open .lep-menu-extra { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: auto; padding-top: clamp(14px, 2.6vh, 28px); font-size: 14px; font-weight: 500; }
  .lep-menu-extra a { color: #C9D3E0 !important; text-decoration: none; }
  .lep-menu-extra a:hover { color: #FFFFFF !important; }
}
@media (max-width: 480px) {
  header[style] { padding-left: 16px !important; padding-right: 16px !important; }
  .lep-menu-btn { width: 44px; padding: 0; justify-content: center; }
  .lep-menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 360px) {
  header[style] > a:first-child { gap: 10px !important; }
  header[style] > a:first-child img { width: 80px; height: auto; }
}
/* a phone on its side: two columns of links, the call-back button in the last cell, so it all fits without scrolling */
@media (max-width: 1260px) and (max-height: 520px) {
  header.is-open nav[aria-label="Main"] { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; align-content: start; }
  header.is-open nav[aria-label="Main"] > a[href="/contact#callback"] { margin-top: 8px; padding: 10px 16px !important; }
  header.is-open .lep-menu-extra, header.is-open nav[aria-label="Main"] > .lep-mega { grid-column: 1 / -1; }
}
@keyframes lepMenuIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Motion. Sections rise in as they arrive; the hero settles on load. Off under reduced motion. ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s cubic-bezier(.2, .7, .2, 1); }
[data-reveal].is-in { opacity: 1; transform: none; }
@keyframes lepRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.lep-motion main > section:first-child > * { animation: lepRise .8s cubic-bezier(.2, .7, .2, 1) both; }
.lep-motion main > section:first-child > * + * { animation-delay: .12s; }
a[style*="border-top: 4px solid"], .calc-card, .pl-pack, a[style*="border: 1px solid #D9DEE5"][style*="display: flex"] { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
a[style*="border-top: 4px solid"]:hover, .calc-card:hover, a[style*="border: 1px solid #D9DEE5"][style*="display: flex"]:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(11, 37, 69, .10); }
a[style*="background: #D89A2B"], a[style*="background: #0B2545"], button[style*="background: #0B2545"], .lep-cta { transition: filter .15s ease, transform .15s ease; }
a[style*="background: #D89A2B"]:hover, a[style*="background: #0B2545"]:hover, button[style*="background: #0B2545"]:hover, .lep-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } * { animation: none !important; } }

/* ---------- A hero over a photograph: the city, under the firm's navy, with the gold of its lights. ---------- */
.lep-hero-photo { position: relative; isolation: isolate; background-color: #0B2545 !important; background-size: cover !important;
  background-repeat: no-repeat !important; background-position: center 45% !important; }
.lep-hero-photo::before { content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(105deg, rgba(7, 26, 51, .94) 0%, rgba(11, 37, 69, .86) 45%, rgba(11, 37, 69, .58) 100%); }
.lep-hero-photo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; z-index: 1; background: linear-gradient(90deg, #D89A2B, rgba(216, 154, 43, .15)); }
.lep-hero-photo > * { position: relative; z-index: 1; }
.lep-photo-vancouver { background-image: url("/img/vancouver.webp") !important; }
.lep-photo-toronto { background-image: url("/img/toronto.webp") !important; background-position: center 92% !important; }
@media (max-width: 860px) { .lep-photo-vancouver { background-image: url("/img/vancouver-m.webp") !important; } .lep-photo-toronto { background-image: url("/img/toronto-m.webp") !important; } }

/* ---------- Request a call back. One form, the same on every page it appears. ---------- */
.lep-callback { background: #071A33; color: #FFFFFF; padding: 72px clamp(24px, 5vw, 80px); border-top: 4px solid #D89A2B; scroll-margin-top: 16px; }
.lep-callback-in { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.lep-callback h2 { margin: 0; font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; color: #FFFFFF; }
.lep-callback p { margin: 0; color: #C9D3E0; font-size: 18px; line-height: 1.6; }
.lep-callback form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; background: #0B2545; border: 1px solid #2A4468; padding: 28px; }
.lep-callback label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: #C9D3E0; }
.lep-callback input[type="text"], .lep-callback input[type="tel"], .lep-callback select { font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid #2A4468; background: #FFFFFF; color: #16202A; }
.lep-callback .span { grid-column: 1 / -1; }
.lep-callback .consent { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; font-size: 13px; font-weight: 400; color: #8FA0B8; line-height: 1.5; }
.lep-callback .consent input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.lep-callback .consent a { color: #C9D3E0; }
.lep-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 14px 28px; background: #D89A2B; color: #071A33; text-decoration: none; font-weight: 700; font-size: 15px; border: 0; font-family: inherit; cursor: pointer; }
.lep-callback .fine { font-size: 12.5px; color: #8FA0B8; margin: 0; }
@media (max-width: 860px) { .lep-callback-in, .lep-callback form { grid-template-columns: 1fr; } .lep-callback { padding: 48px 24px; } }

/* ---------- Small labels ---------- */
.lep-soon { display: inline-block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: #5B6470; background: #F0F2F5; border: 1px solid #D9DEE5; padding: 7px 12px; white-space: nowrap; }

/* ---------- Back to top ---------- */
.lep-top { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  background: #0B2545; color: #FFFFFF; border: 1px solid #2A4468; box-shadow: 0 4px 16px rgba(11, 37, 69, .25); opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease; }
.lep-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.lep-top:hover { background: #D89A2B; color: #071A33; }
/* the calculators' floating contents button sits above it on a small screen */
.pl-toc { bottom: 78px; }
@media (min-width: 1240px) { .pl-toc { bottom: auto; } }
@media (max-width: 860px) { .lep-top { right: 14px; bottom: 14px; width: 42px; height: 42px; } }

/* ---------- Drop-down menus (nav.js). A panel of direct links slides out from under the header. ---------- */
.lep-hdr { position: relative; z-index: 50; }
.lep-mega-t { font: inherit; color: #0B2545; background: none; border: 0; margin: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; }
.lep-mega-t:hover, .lep-mega-t[aria-expanded="true"] { color: #9B3A23; }
.lep-mega-chev { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s ease; }
.lep-mega-t[aria-expanded="true"] .lep-mega-chev { transform: translateY(1px) rotate(225deg); }
.lep-mega { position: absolute; left: 0; right: 0; top: 100%; background: #FFFFFF; border-top: 1px solid #D9DEE5; border-bottom: 3px solid #D89A2B; box-shadow: 0 24px 48px rgba(7, 26, 51, .14); padding: 40px clamp(24px, 5vw, 80px) 44px; max-height: calc(100vh - 140px); overflow-y: auto; opacity: 0; transform: translateY(-10px); transition: opacity .2s ease, transform .25s cubic-bezier(.2, .7, .2, 1); pointer-events: none; }
.lep-mega.is-open { opacity: 1; transform: none; pointer-events: auto; }
.lep-mega-in { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: 56px; }
.lep-mega-intro { display: flex; flex-direction: column; gap: 12px; padding-right: 32px; border-right: 1px solid #D9DEE5; }
.lep-mega-h { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 28px; line-height: 1.15; color: #0B2545; }
.lep-mega-blurb { margin: 0; font-size: 15px; line-height: 1.55; color: #5B6470; font-weight: 400; }
.lep-mega-all { align-self: flex-start; margin-top: 6px; font-size: 15px; font-weight: 700; text-decoration: none; border-bottom: 2px solid #D89A2B; padding-bottom: 2px; }
.lep-mega-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 32px; }
.lep-mega-gh { display: block; margin-bottom: 12px; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: #D89A2B; font-weight: 700; }
.lep-mega-list { margin: 0; padding: 0; list-style: none; columns: var(--cols, 1); column-gap: 32px; }
.lep-mega-list li { break-inside: avoid; }
.lep-mega-list a { display: inline-block; padding: 6px 0; font-size: 15px; font-weight: 500; line-height: 1.35; color: #16202A; text-decoration: none; background: linear-gradient(#D89A2B, #D89A2B) 0 100% / 0 2px no-repeat; transition: background-size .2s ease, color .15s ease; }
.lep-mega-list a:hover, .lep-mega-list a:focus-visible { color: #0B2545; background-size: 100% 2px; }
/* the columns rise in one after another as a panel opens */
.lep-mega.is-open .lep-mega-group { animation: lepRise .35s cubic-bezier(.2, .7, .2, 1) both; }
.lep-mega.is-open .lep-mega-group:nth-child(2) { animation-delay: .04s; }
.lep-mega.is-open .lep-mega-group:nth-child(3) { animation-delay: .08s; }
.lep-mega.is-open .lep-mega-group:nth-child(4) { animation-delay: .12s; }
@media (max-width: 1100px) {
  .lep-mega { padding: 24px 24px 28px; max-height: 70vh; }
  .lep-mega-in { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .lep-mega-intro { padding: 0 0 18px; border-right: 0; border-bottom: 1px solid #D9DEE5; }
  .lep-mega-h { font-size: 22px; }
  .lep-mega-body { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; }
  .lep-mega-list { columns: 1; }
  .lep-mega-list a { padding: 8px 0; }
}
@media (prefers-reduced-motion: reduce) { .lep-mega, .lep-mega-chev { transition: none; } }

/* ---------- A free account, above the calculators, reports and pitch deck (/account.js) ---------- */
.lep-acct { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; max-width: 1200px; margin: 0 auto 24px; padding: 14px 18px; background: #FBF3E3; border-left: 4px solid #D89A2B; font-size: 15px; line-height: 1.5; color: #16202A; box-sizing: border-box; }
.lep-acct > span:first-child { flex: 1 1 320px; }
.lep-acct a { font-weight: 600; }
.lep-acct .lep-acct-go { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; background: #0B2545; color: #FFFFFF; text-decoration: none; }
.lep-acct .lep-acct-go:hover { background: #071A33; color: #FFFFFF; }
.lep-acct-status { font-size: 13px; color: #5B6470; }
.lep-acct-status.is-good { color: #3F7A52; }
.lep-acct-status.is-bad { color: #9B3A23; }
/* Business Profiles: the figures the tools share, and saving to a profile (/account.js) */
.lep-sync { font-size: 13px; line-height: 1.4; margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.lep-sync:empty { display: none; }
.lep-sync.is-synced { color: #3F7A52; font-weight: 600; }
.lep-sync-btn { font: inherit; font-size: 13px; font-weight: 700; color: #0B2545; background: #FFFFFF; border: 1.5px solid #3F7A52; padding: 3px 10px; cursor: pointer; }
.lep-sync-btn:hover { background: #EFF6F0; }
.lep-sync-was { color: #5B6470; }
.calc-field.is-shared input, .calc-field.is-shared select { border-color: #9CC3A8; }
.calc-field.is-shared:has(.lep-sync.is-synced) input, .calc-field.is-shared:has(.lep-sync.is-synced) select { color: #2F6B45; background: #F4FAF5; }
.lep-shared-note { color: #3F7A52; margin: -4px 0 6px; }
.lep-source a { font-weight: 700; overflow-wrap: anywhere; }
.lep-link-line { font-size: 13px; color: #5B6470; margin-top: 4px; }
.lep-link-line:empty { display: none; }
.lep-replace { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; color: #8A5A0B; }
.lep-replace input { margin-top: 2px; accent-color: #D89A2B; }
.lep-save { display: flex; flex-direction: column; gap: 6px; margin: 18px 0; padding: 14px 16px; background: #F5F6F8; border-left: 4px solid #0B2545; }
.lep-save label { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #5B6470; }
.lep-save-row { display: flex; flex-wrap: wrap; gap: 8px; }
.lep-save select, .lep-save input { flex: 1 1 200px; min-height: 42px; font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid #B8C0CC; background: #FFFFFF; }
.lep-save-btn { flex: 0 0 auto; min-height: 42px; padding: 8px 18px; font: inherit; font-size: 15px; font-weight: 700; color: #071A33; background: #D89A2B; border: 0; cursor: pointer; }
.lep-save-btn:hover { background: #0B2545; color: #FFFFFF; }
.lep-save-status { font-size: 13px; color: #5B6470; }
.lep-save-status.is-warn { color: #8A5A0B; }
.lep-save-status.is-good { color: #3F7A52; }
.lep-save-status.is-bad { color: #9B3A23; }
.calc-card-saved { font-size: 12px; font-weight: 700; color: #3F7A52; }
/* Pin to Business Profile (/account.js pinButton) */
.lep-pin { display: inline-flex; }
.lep-pin:empty { display: none; }
.lep-pin-btn { font: inherit; font-size: 13px; font-weight: 700; color: #0B2545; background: #FFFFFF; border: 1.5px solid #B8C0CC; padding: 4px 12px; cursor: pointer; white-space: nowrap; }
.lep-pin-btn:hover { border-color: #0B2545; }
.lep-pin-btn.is-pinned { color: #8A5A0B; border-color: #D89A2B; background: #FBF3E3; }
.calc-title-row, .pl-choose-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.calc-title-row .calc-title, .pl-choose-head h2 { margin: 0; }
/* a report that matches no ready-made one, and its name (/reports) */
.pl-custom-note { margin: 14px 0 0; padding: 12px 14px; background: #FBF3E3; border-left: 4px solid #D89A2B; font-size: 14px; line-height: 1.5; }
.pl-custom-name { margin-top: 8px; }
.pl-custom-name input { font: inherit; font-size: 15px; min-height: 40px; padding: 6px 10px; border: 1px solid #B8C0CC; width: min(320px, 100%); }
/* saved reports in the /reports sidebar */
.pl-side-saved-row { display: flex; align-items: center; gap: 4px; }
.pl-side-saved-row .cx-cat { flex: 1; }
.pl-side-del { flex: none; }
/* "Explain every term" (/calc/explain.js) */
.lep-explain-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.lep-explain-switch { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 700; color: #0B2545; background: none; border: 0; padding: 0; cursor: pointer; }
.lep-explain-track { width: 36px; height: 20px; border-radius: 10px; background: #B8C0CC; position: relative; transition: background .15s; flex: none; }
.lep-explain-track i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #FFFFFF; transition: left .15s; }
.lep-explain-switch[aria-checked="true"] .lep-explain-track { background: #3F7A52; }
.lep-explain-switch[aria-checked="true"] .lep-explain-track i { left: 18px; }
.lep-explain-switch:focus-visible { outline: 2px solid #D89A2B; outline-offset: 3px; }
.lep-explain-hint { color: #5B6470; font-size: 14px; }
/* a result's "Calculation": its formula in words (/calc/explain.js) */
.lep-calc-btn { flex: none; font: 700 11px/1 "Manrope", system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; color: #0B2545; background: #FFFFFF; border: 1.5px solid #0B2545; border-radius: 11px; padding: 4px 8px; margin-left: 6px; cursor: pointer; }
.lep-calc-btn[aria-expanded="true"] { background: #0B2545; color: #FFFFFF; }
.lep-calc-demo { display: inline-block; cursor: default; margin: 0 2px; vertical-align: middle; }
.lep-calc { margin: 6px 0 4px; padding: 10px 14px; background: #F0F2F5; border-left: 3px solid #0B2545; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; line-height: 1.5; color: #16202A; text-align: left; }
.lep-calc[hidden] { display: none; }
.lep-calc-h { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #5B6470; }
.lep-calc code { font-family: inherit; white-space: normal; }
.calc-primary .lep-calc { color: #16202A; }
/* an income tax box on the estimate */
input.is-estimate { font-style: italic; color: #5B6470; }
.calc-estimate { font-size: 13px; color: #5B6470; margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.calc-estimate .pl-link { font-size: 13px; }
.calc-estimate-note { flex-basis: 100%; }

/* the map of the figures (/calculator-map, /calc/map.js) */
.map-teaser { display: flex; flex-direction: column; gap: 4px; margin: 0 0 28px; padding: 16px 20px; border: 1px solid #D9DEE5; border-left: 4px solid #3F7A52; background: #F4FAF5; text-decoration: none; color: #16202A; }
.map-teaser strong { color: #0B2545; font-size: 17px; }
.map-teaser:hover { border-color: #3F7A52; }
.map-app { max-width: 1200px; margin: 0 auto; }
.map-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; margin-bottom: 18px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: #5B6470; }
.map-legend span { display: inline-flex; align-items: center; gap: 8px; }
.map-key { display: inline-block; width: 26px; height: 0; border-top: 2px solid #C3CAD4; }
.map-key.is-have { border-top-color: #3F7A52; }
.map-key.is-made { border-top: 2px dashed #D89A2B; }
.map-status { margin: 0; font-size: 15px; color: #16202A; }
.map-status select { font: inherit; font-size: 14px; padding: 4px 6px; border: 1px solid #B8C0CC; }
.map-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.map-diagram { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 0.6fr) minmax(0, 1fr); }
.map-lines { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.map-line { fill: none; stroke: #C3CAD4; stroke-width: 1.5; opacity: .55; transition: opacity .15s, stroke-width .15s; }
.map-line.is-have { stroke: #3F7A52; opacity: .7; }
.map-line.is-made { stroke: #D89A2B; stroke-dasharray: 5 4; opacity: .8; }
.map-diagram.is-focused .map-line { opacity: .08; }
.map-diagram.is-focused .map-line.is-lit { opacity: 1; stroke-width: 2.5; }
.map-col { display: flex; flex-direction: column; gap: 6px; position: relative; z-index: 1; }
.map-col h2 { margin: 0 0 6px; font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 22px; color: #0B2545; }
.map-col h3 { margin: 14px 0 2px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #5B6470; }
.map-node { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 6px 10px; font: inherit; font-size: 14px; text-align: left; color: #16202A; background: #FFFFFF; border: 1px solid #D9DEE5; cursor: pointer; transition: opacity .15s, border-color .15s, box-shadow .15s; }
.map-node:hover, .map-node:focus-visible { border-color: #0B2545; outline: none; box-shadow: 0 0 0 2px rgba(11,37,69,.15); }
.map-node[aria-pressed="true"] { border-color: #0B2545; box-shadow: 0 0 0 2px #0B2545; }
.map-diagram.is-focused .map-node { opacity: .35; }
.map-diagram.is-focused .map-node.is-on { opacity: 1; }
.map-label { flex: 1 1 auto; min-width: 0; }
.map-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #B8C0CC; background: #FFFFFF; }
.is-have > .map-dot { border-color: #3F7A52; background: #3F7A52; }
.map-value { flex: none; font-weight: 700; color: #2F6B45; font-variant-numeric: tabular-nums; }
.map-made { flex: none; color: #D89A2B; font-weight: 700; }
.map-tool { font-weight: 600; color: #0B2545; }
.map-count { flex: none; font-size: 12px; font-weight: 700; color: #5B6470; background: #F0F2F5; padding: 2px 8px; border-radius: 10px; }
.map-count.is-full { color: #FFFFFF; background: #3F7A52; }
.map-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.map-panel { position: sticky; top: calc(var(--lep-head, 0px) + 16px); padding: 18px 20px; background: #F5F6F8; border-left: 4px solid #0B2545; font-size: 15px; display: flex; flex-direction: column; gap: 8px; }
.map-panel h3 { margin: 0; font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 21px; color: #0B2545; }
.map-panel p { margin: 0; }
.map-state { font-weight: 700; color: #5B6470; }
.map-state.is-have { color: #2F6B45; }
.map-uses { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.map-uses li { display: flex; align-items: center; gap: 8px; }
.map-list { margin-top: 28px; }
.map-list summary { cursor: pointer; font-weight: 700; color: #0B2545; }
.map-list table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.map-list th, .map-list td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid #D9DEE5; }
.map-list thead th { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #5B6470; }
.map-sub { display: block; font-size: 12px; font-weight: 400; color: #5B6470; }
.map-loners { margin-top: 18px; }
@media (max-width: 860px) {
  .map-body { grid-template-columns: 1fr; }
  .map-diagram { display: none; }
  .map-panel { display: none; }
}
@media (prefers-reduced-motion: reduce) { .map-line, .map-node { transition: none; } }
/* ---------- The resources page (/resources, with /resources.js): a search, goals down the left, cards by goal. ---------- */
.rx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rx-eyebrow { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: #D89A2B; font-weight: 700; }
.rx-hero { background: #0B2545; color: #FFFFFF; padding: 72px clamp(24px, 5vw, 80px) 56px; }
.rx-hero-in { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.rx-hero h1 { margin: 0; max-width: 860px; font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: clamp(32px, 5vw, 52px); line-height: 1.1; }
.rx-hero p { margin: 0; max-width: 780px; font-size: 19px; color: #C9D3E0; }
.rx-search { margin-top: 10px; max-width: 780px; display: flex; align-items: center; gap: 12px; background: #FFFFFF; color: #5B6470; padding: 0 8px 0 18px; border: 2px solid transparent; }
.rx-search:focus-within { border-color: #D89A2B; }
.rx-search svg { flex: none; }
.rx-search input { flex: 1; min-width: 0; border: 0; padding: 18px 0; font: inherit; font-size: 18px; color: #16202A; background: transparent; }
.rx-search input:focus { outline: none; }
.rx-search input::-webkit-search-cancel-button { display: none; }
.rx-clear { flex: none; width: 40px; height: 40px; border: 0; background: #F0F2F5; color: #0B2545; font-size: 24px; line-height: 1; cursor: pointer; }
.rx-clear:hover { background: #D9DEE5; }
.rx-popular { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: #C9D3E0; }
.rx-popular span { margin-right: 4px; }
.rx-popular button { font: inherit; font-size: 14px; font-weight: 600; color: #FFFFFF; background: transparent; border: 1px solid #2A4468; padding: 7px 14px; cursor: pointer; }
.rx-popular button:hover, .rx-popular button:focus-visible { border-color: #D89A2B; color: #D89A2B; }

.rx-wrap { padding: 56px clamp(24px, 5vw, 80px) 96px; background: #FFFFFF; }
.rx-layout { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; }
.rx-side { position: sticky; top: calc(var(--lep-head, 76px) + 24px); display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - var(--lep-head, 76px) - 48px); overflow-y: auto; }
.rx-side-h { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: #5B6470; font-weight: 700; }
.rx-side-h + nav, .rx-side-h + .rx-types { margin-bottom: 16px; }
.rx-goals { list-style: none; margin: 0; padding: 0; border-left: 2px solid #D9DEE5; }
.rx-goals a { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-left: -2px; padding: 9px 12px 9px 16px; border-left: 2px solid transparent; color: #16202A; text-decoration: none; font-size: 15px; font-weight: 600; }
.rx-goals a:hover { color: #0B2545; background: #F5F6F8; }
.rx-goals a.is-on { border-left-color: #D89A2B; color: #0B2545; background: #F5F6F8; }
.rx-goals a.is-none { color: #9AA3AE; pointer-events: none; }
.rx-n { font-size: 12px; font-weight: 700; color: #5B6470; background: #F0F2F5; min-width: 26px; padding: 3px 7px; text-align: center; }
.rx-goals a.is-on .rx-n { background: #0B2545; color: #FFFFFF; }
.rx-types { display: flex; flex-wrap: wrap; gap: 6px; }
.rx-types button { font: inherit; font-size: 14px; font-weight: 600; color: #0B2545; background: #FFFFFF; border: 1px solid #B8C0CC; padding: 7px 12px; cursor: pointer; }
.rx-types button:hover { border-color: #0B2545; }
.rx-types button[aria-pressed="true"] { background: #0B2545; border-color: #0B2545; color: #FFFFFF; }
.rx-ask { display: flex; flex-direction: column; gap: 4px; padding: 18px; background: #F5F6F8; border-top: 3px solid #D89A2B; font-size: 14px; color: #5B6470; }
.rx-ask strong { color: #0B2545; font-size: 15px; }
.rx-ask a { font-weight: 700; text-decoration: none; margin-top: 4px; }

.rx-main { display: flex; flex-direction: column; gap: 64px; }
.rx-status { margin: 0 0 -24px; font-size: 15px; color: #5B6470; min-height: 1.4em; }
.rx-status:empty { display: none; }
.rx-main.is-filtering { gap: 48px; }
.rx-empty { display: flex; flex-direction: column; gap: 8px; padding: 32px; background: #F5F6F8; border-left: 4px solid #D89A2B; }
.rx-empty strong { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 24px; color: #0B2545; }
.rx-group { scroll-margin-top: calc(var(--lep-head, 76px) + 24px); }
.rx-group-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid #0B2545; }
.rx-group-head h2 { margin: 0; font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 34px; line-height: 1.15; color: #0B2545; }
.rx-group-head p { margin: 0; color: #5B6470; max-width: 720px; }
.rx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.rx-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 1px solid #D9DEE5; background: #FFFFFF; color: #16202A; text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
a.rx-card:hover, a.rx-card:focus-visible { border-color: #0B2545; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(11, 37, 69, .08); color: #16202A; }
.rx-card strong { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 22px; line-height: 1.2; color: #0B2545; }
.rx-desc { flex: 1; font-size: 15px; color: #5B6470; }
.rx-go { font-size: 14px; font-weight: 700; color: #0B2545; }
.rx-card.is-soon { background: #F5F6F8; border-style: dashed; }
.rx-card.is-soon strong { color: #5B6470; }
.rx-badge { align-self: flex-start; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; padding: 4px 9px; }
.rx-badge-tool { background: #FBF3E3; color: #8A5A0B; }
.rx-badge-guide { background: #EAF0F7; color: #0B2545; }
.rx-badge-reference { background: #EFF6F0; color: #3F5B41; }
.rx-badge-soon { background: #F0F2F5; color: #5B6470; border: 1px solid #D9DEE5; }
.rx-gloss { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 40px; }
.rx-gloss > div { padding: 16px 0; border-bottom: 1px solid #D9DEE5; }
.rx-gloss dt { font-weight: 700; color: #0B2545; margin-bottom: 4px; }
.rx-gloss dd { margin: 0; font-size: 15px; color: #5B6470; }

/* the sidebar folds up above the list: goals scroll sideways, the "can't find it" box goes */
@media (max-width: 960px) {
  .rx-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .rx-side { position: static; max-height: none; overflow: visible; }
  .rx-goals { display: flex; gap: 8px; overflow-x: auto; border-left: 0; padding-bottom: 4px; }
  .rx-goals a { margin: 0; border: 1px solid #D9DEE5; padding: 8px 12px; white-space: nowrap; }
  .rx-goals a.is-on { border-color: #0B2545; }
  .rx-ask { display: none; }
  .rx-goals li:has(a.is-none) { display: none; }
  .rx-wrap { padding-top: 40px; }
  .rx-group-head h2 { font-size: 28px; }
}
