/* ExpressQuote design system — one set of tokens for the marketing site,
   sign-in and the roofer app, so moving between them feels like one
   product. Loaded after bootstrap and application.css, so it wins.

   The palette is taken from the photography the marketing site leads
   with: dark shingle for ink, open sky for the brand colour, and a small
   dose of hi-vis for emphasis. Bootstrap's own variables are redefined
   rather than fought, so every existing component picks the theme up.

   Homeowner pages (landing and quote) have their own design entirely:
   customer.css. */

:root {
  /* Ink — shingle dark through slate. */
  --eq-ink: #0b1324;
  --eq-ink-2: #1e293b;
  --eq-muted: #5b6577;
  --eq-line: #e4e8ef;
  --eq-surface: #ffffff;
  --eq-canvas: #f5f7fa;

  /* Brand — sky. 600 carries white text at AA; 50/100 are tints. */
  --eq-brand: #0284c7;
  --eq-brand-600: #0284c7;
  --eq-brand-700: #0369a1;
  --eq-brand-500: #0ea5e9;
  --eq-brand-100: #e0f2fe;
  --eq-brand-50: #f0f9ff;
  --eq-brand-rgb: 2, 132, 199;

  /* Hi-vis — used sparingly: a highlight, never a surface. */
  --eq-hivis: #d9f99d;
  --eq-hivis-ink: #3f6212;

  --eq-radius-sm: 0.5rem;
  --eq-radius: 0.75rem;
  --eq-radius-lg: 1.25rem;
  --eq-shadow-sm: 0 1px 2px rgba(11, 19, 36, 0.06);
  --eq-shadow: 0 1px 3px rgba(11, 19, 36, 0.06), 0 6px 16px -4px rgba(11, 19, 36, 0.08);
  --eq-shadow-lg: 0 24px 48px -12px rgba(11, 19, 36, 0.25);

  --eq-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Bootstrap, re-pointed. */
  --bs-body-font-family: var(--eq-font);
  --bs-body-color: var(--eq-ink-2);
  /* Bootstrap paints cards, inputs, dropdowns and list groups with
     --bs-body-bg, so it stays white; the page canvas is set on body. */
  --bs-body-bg: #fff;
  --bs-emphasis-color: var(--eq-ink);
  --bs-secondary-color: var(--eq-muted);
  --bs-border-color: var(--eq-line);
  --bs-border-radius: var(--eq-radius-sm);
  --bs-border-radius-lg: var(--eq-radius);
  --bs-border-radius-xl: var(--eq-radius-lg);
  --bs-primary: var(--eq-brand);
  --bs-primary-rgb: var(--eq-brand-rgb);
  --bs-info: var(--eq-brand);
  --bs-info-rgb: var(--eq-brand-rgb);
  --bs-info-text-emphasis: var(--eq-brand-700);
  --bs-info-bg-subtle: var(--eq-brand-50);
  --bs-info-border-subtle: #bae6fd;
  --bs-link-color: var(--eq-brand-600);
  --bs-link-color-rgb: var(--eq-brand-rgb);
  --bs-link-hover-color: var(--eq-brand-700);
  --bs-focus-ring-color: rgba(var(--eq-brand-rgb), 0.25);

  /* The old accent variable, kept so earlier rules follow the brand. */
  --eq-accent: var(--eq-brand-500);
  --eq-sidebar-bg: var(--eq-ink);
  --eq-main-bg: var(--eq-canvas);
}

body {
  font-family: var(--eq-font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--eq-canvas);
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  color: var(--eq-ink);
  letter-spacing: -0.02em;
  font-weight: 700;
}

.fs-3 { letter-spacing: -0.02em; }

/* ---- Buttons ------------------------------------------------------------
   btn-info has been the app's primary action all along; it becomes the
   brand button rather than every view changing class. */
.btn {
  --bs-btn-font-weight: 500;
  --bs-btn-border-radius: var(--eq-radius-sm);
  --bs-btn-focus-box-shadow: 0 0 0 0.25rem rgba(var(--eq-brand-rgb), 0.25);
  letter-spacing: -0.005em;
}

.btn-primary,
.btn-info {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--eq-brand-600);
  --bs-btn-border-color: var(--eq-brand-600);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--eq-brand-700);
  --bs-btn-hover-border-color: var(--eq-brand-700);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #075985;
  --bs-btn-active-border-color: #075985;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--eq-brand-600);
  --bs-btn-disabled-border-color: var(--eq-brand-600);
  box-shadow: 0 1px 2px rgba(2, 132, 199, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-outline-info,
.btn-outline-primary {
  --bs-btn-color: var(--eq-brand-700);
  --bs-btn-border-color: #bae6fd;
  --bs-btn-hover-color: var(--eq-brand-700);
  --bs-btn-hover-bg: var(--eq-brand-50);
  --bs-btn-hover-border-color: var(--eq-brand-500);
  --bs-btn-active-color: var(--eq-brand-700);
  --bs-btn-active-bg: var(--eq-brand-100);
  --bs-btn-active-border-color: var(--eq-brand-500);
}

.btn-outline-secondary {
  --bs-btn-color: var(--eq-ink-2);
  --bs-btn-border-color: var(--eq-line);
  --bs-btn-bg: #fff;
  --bs-btn-hover-color: var(--eq-ink);
  --bs-btn-hover-bg: #f1f4f8;
  --bs-btn-hover-border-color: #d3d9e2;
  --bs-btn-active-color: var(--eq-ink);
  --bs-btn-active-bg: #e9edf3;
  --bs-btn-active-border-color: #d3d9e2;
}

.btn-dark {
  --bs-btn-bg: var(--eq-ink);
  --bs-btn-border-color: var(--eq-ink);
  --bs-btn-hover-bg: var(--eq-ink-2);
  --bs-btn-hover-border-color: var(--eq-ink-2);
}

.text-info { color: var(--eq-brand-600) !important; }
.bg-info { background-color: var(--eq-brand-600) !important; }
.text-bg-info { color: #fff !important; background-color: var(--eq-brand-600) !important; }
.border-info { border-color: var(--eq-brand-500) !important; }

/* ---- Surfaces ------------------------------------------------------------ */
.card {
  --bs-card-border-color: var(--eq-line);
  --bs-card-border-radius: var(--eq-radius);
  --bs-card-inner-border-radius: calc(var(--eq-radius) - 1px);
  --bs-card-cap-bg: #fff;
  box-shadow: var(--eq-shadow-sm);
}

.card-header {
  border-bottom-color: var(--eq-line);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.eq-stat-card {
  border: 1px solid var(--eq-line);
  box-shadow: var(--eq-shadow-sm);
}

.eq-stat-card .stat-value { letter-spacing: -0.03em; color: var(--eq-ink); }

.form-control,
.form-select {
  border-color: #d8dee7;
  border-radius: var(--eq-radius-sm);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--eq-brand-500);
  box-shadow: 0 0 0 0.2rem rgba(var(--eq-brand-rgb), 0.18);
}

.form-check-input:checked {
  background-color: var(--eq-brand-600);
  border-color: var(--eq-brand-600);
}

.form-label { font-weight: 500; color: var(--eq-ink-2); }

.table {
  --bs-table-border-color: var(--eq-line);
}

.table > thead > tr > th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--eq-muted);
  background: #fafbfc;
}

.badge { font-weight: 600; letter-spacing: 0.01em; }

.nav-tabs { --bs-nav-tabs-border-color: var(--eq-line); }
.nav-tabs .nav-link { color: var(--eq-muted); font-weight: 500; }
.nav-tabs .nav-link.active { color: var(--eq-ink); }

.nav-pills { --bs-nav-pills-link-active-bg: var(--eq-brand-600); }

.alert { border-radius: var(--eq-radius); }

.breadcrumb { --bs-breadcrumb-divider-color: #b6bfcc; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---- Brand mark (shared/_brand_mark) ------------------------------------ */
.eq-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.eq-mark-tile {
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, var(--eq-brand-500), var(--eq-brand-700));
  color: #fff;
  font-size: 1.05rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 10px -4px rgba(2, 132, 199, 0.6);
  flex-shrink: 0;
}

.eq-mark-word { font-size: 1.15rem; }
.eq-mark-word b { font-weight: 700; color: var(--eq-brand-500); }

/* ---- App shell ------------------------------------------------------------ */
.eq-sidebar {
  background: var(--eq-ink) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.eq-sidebar .nav-link {
  color: #a3adbd;
  border-radius: var(--eq-radius-sm);
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  font-size: 0.925rem;
}

.eq-sidebar .nav-link .bi { opacity: 0.85; }

.eq-sidebar .nav-link:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.06);
}

.eq-sidebar .nav-link.active {
  background-color: rgba(14, 165, 233, 0.16);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--eq-brand-500);
}

.eq-sidebar .nav-link.active .bi { color: var(--eq-brand-500); opacity: 1; }

.eq-sidebar .eq-nav-heading {
  color: #5f6b7e !important;
  font-weight: 600;
}

.eq-mobile-topbar { background-color: var(--eq-ink); }

.eq-main { background: var(--eq-canvas); }

@media (min-width: 992px) {
  .eq-main { padding: 2rem 2.5rem !important; }
}

/* ---- Sign-in / sign-up (split, photo on the left) ----------------------- */
.eq-auth-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--eq-canvas);
}

@media (min-width: 992px) {
  .eq-auth-split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}

.eq-auth-photo {
  position: relative;
  display: none;
  background-size: cover;
  background-position: center;
  color: #fff;
}

@media (min-width: 992px) {
  .eq-auth-photo { display: flex; flex-direction: column; justify-content: space-between; padding: 2.5rem; }
}

.eq-auth-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 19, 36, 0.35) 0%, rgba(11, 19, 36, 0.1) 40%, rgba(11, 19, 36, 0.85) 100%);
}

.eq-auth-photo > * { position: relative; }

.eq-auth-quote {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  max-width: 28rem;
}

.eq-auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1.25rem;
}

@media (min-width: 576px) {
  .eq-auth-panel { padding: 3rem; }
}

.eq-auth-form {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

/* Hi-vis highlight under a word in a headline. */
.eq-hivis {
  background: linear-gradient(transparent 62%, var(--eq-hivis) 62%, var(--eq-hivis) 92%, transparent 92%);
  padding: 0 0.1em;
}

/* The mark over a photograph: a frosted backing, since sky-blue type
   vanishes against an actual sky. */
.eq-mark-on-photo {
  align-self: flex-start;
  background: rgba(11, 19, 36, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.35rem 0.9rem 0.35rem 0.35rem;
  border-radius: 999px;
  color: #fff;
}

.eq-mark-on-photo .eq-mark-word b,
.eq-sidebar .eq-mark-word b,
.eq-mobile-topbar .eq-mark-word b { color: #7dd3fc; }

/* ==========================================================================
   Marketing site (layouts/marketing, marketing/home). Same tokens as the
   app; more air.
   ========================================================================== */
.eq-mk { background: #fff; color: var(--eq-ink-2); }

.eq-mk-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
  padding: 0.85rem 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(11, 19, 36, 0.06);
}

.eq-mk-navlink { color: var(--eq-muted); text-decoration: none; }
.eq-mk-nav .btn { white-space: nowrap; }

@media (max-width: 420px) {
  .eq-mk-nav .eq-mark-word { font-size: 1rem; }
  .eq-mk-nav .btn { padding-left: 0.7rem; padding-right: 0.7rem; }
}
.eq-mk-navlink:hover { color: var(--eq-ink); }

/* Hero: the photograph is the page. Copy sits bottom-left over the dark
   shingles, where white type reads without fighting the roofers above. */
.eq-mk-hero {
  position: relative;
  overflow: hidden;
  min-height: min(88vh, 860px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: var(--eq-ink);
}

/* Mirrored so the crew stands on the right and the copy has open
   shingle to sit on at the left. */
.eq-mk-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--eq-hero-image) center 30% / cover no-repeat;
  transform: scaleX(-1);
}

.eq-mk-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 19, 36, 0) 30%, rgba(11, 19, 36, 0.5) 62%, rgba(11, 19, 36, 0.9) 100%),
    linear-gradient(90deg, rgba(11, 19, 36, 0.7) 0%, rgba(11, 19, 36, 0.25) 45%, rgba(11, 19, 36, 0) 70%);
}

.eq-mk-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3rem;
  padding-top: 8rem;
  padding-bottom: 4.5rem;
}

.eq-mk-hero-copy { max-width: 36rem; }

.eq-mk-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.eq-mk-eyebrow .bi { color: var(--eq-hivis); }

.eq-mk-display {
  color: #fff;
  font-size: clamp(2.4rem, 4.6vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.eq-mk-lede {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  max-width: 36rem;
  margin-bottom: 2rem;
}

.eq-mk-btn-glass {
  --bs-btn-color: #fff;
  --bs-btn-bg: rgba(255, 255, 255, 0.12);
  --bs-btn-border-color: rgba(255, 255, 255, 0.35);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: rgba(255, 255, 255, 0.22);
  --bs-btn-hover-border-color: rgba(255, 255, 255, 0.5);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
}

/* The homeowner's quote card, floating over the photo. */
.eq-mk-hero-card {
  width: 19rem;
  flex-shrink: 0;
  background: #fff;
  color: var(--eq-ink);
  border-radius: var(--eq-radius-lg);
  padding: 1.25rem;
  box-shadow: var(--eq-shadow-lg);
  transform: rotate(1.5deg);
}

.eq-mk-hero-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--eq-muted);
  margin-bottom: 1rem;
}

.eq-mk-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px #dcfce7; }

.eq-mk-hero-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.eq-mk-hero-card-stats div {
  background: var(--eq-canvas);
  border-radius: var(--eq-radius-sm);
  padding: 0.55rem 0.5rem;
  text-align: center;
}

.eq-mk-hero-card-stats b { display: block; font-size: 1.05rem; letter-spacing: -0.02em; }
.eq-mk-hero-card-stats span { font-size: 0.7rem; color: var(--eq-muted); }

.eq-mk-hero-card-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--eq-line);
  padding-top: 0.85rem;
  margin-bottom: 0.85rem;
}

.eq-mk-hero-card-total span { font-size: 0.8rem; color: var(--eq-muted); }
.eq-mk-hero-card-total b { font-size: 1.7rem; letter-spacing: -0.03em; }

.eq-mk-hero-card-cta {
  text-align: center;
  background: var(--eq-brand-600);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--eq-radius-sm);
  padding: 0.6rem;
}

/* Three facts under the hero. */
.eq-mk-facts { border-bottom: 1px solid var(--eq-line); }

.eq-mk-facts-list {
  list-style: none;
  margin: 0;
  padding: 1.4rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 3rem;
  color: var(--eq-ink-2);
  font-weight: 500;
}

.eq-mk-facts-list .bi { color: var(--eq-brand-600); margin-right: 0.5rem; }

.eq-mk-section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.eq-mk-section-alt { background: var(--eq-canvas); }

.eq-mk-section-head { text-align: center; max-width: 42rem; margin: 0 auto 3.5rem; }

.eq-mk-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eq-brand-600);
  margin-bottom: 0.85rem;
}

.eq-mk-h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.eq-mk-body { font-size: 1.125rem; line-height: 1.65; color: var(--eq-muted); max-width: 34rem; }

.eq-mk-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
}

.eq-mk-steps li {
  padding: 2rem;
  border: 1px solid var(--eq-line);
  border-radius: var(--eq-radius-lg);
  background: #fff;
}

.eq-mk-steps h3 { font-size: 1.3rem; margin: 1.25rem 0 0.5rem; }
.eq-mk-steps p { color: var(--eq-muted); margin: 0; line-height: 1.6; }

.eq-mk-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: var(--eq-brand-50);
  color: var(--eq-brand-700);
  font-weight: 700;
}

.eq-mk-photo {
  border-radius: var(--eq-radius-lg);
  overflow: hidden;
  aspect-ratio: 5 / 4;
  max-width: 100%;
  box-shadow: var(--eq-shadow);
}

.eq-mk-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.eq-mk-checks { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: 0.8rem; }

.eq-mk-checks li { display: flex; gap: 0.75rem; align-items: flex-start; font-weight: 500; color: var(--eq-ink-2); }

.eq-mk-checks li::before {
  content: "\F26E"; /* bi-check-lg */
  font-family: "bootstrap-icons";
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--eq-hivis);
  color: var(--eq-hivis-ink);
  font-size: 0.85rem;
}

.eq-mk-plan {
  height: 100%;
  background: #fff;
  border: 1px solid var(--eq-line);
  border-radius: var(--eq-radius-lg);
  padding: 2rem;
  text-align: center;
}

.eq-mk-plan-featured { border-color: var(--eq-brand-500); box-shadow: 0 0 0 3px var(--eq-brand-100); }
.eq-mk-plan-name { font-weight: 600; color: var(--eq-muted); margin-bottom: 0.5rem; }
.eq-mk-plan-price { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.04em; color: var(--eq-ink); }
.eq-mk-plan-price span { font-size: 1rem; font-weight: 500; color: var(--eq-muted); letter-spacing: 0; }
.eq-mk-plan-meta { font-size: 0.9rem; color: var(--eq-muted); margin-top: 0.5rem; }

.eq-mk-cta {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  background:
    radial-gradient(60rem 30rem at 50% 120%, rgba(14, 165, 233, 0.35), transparent 60%),
    var(--eq-ink);
}

.eq-mk-footer {
  background: var(--eq-ink);
  color: #94a3b8;
  padding: 3.5rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.eq-mk-footer a { color: #cbd5e1; text-decoration: none; }
.eq-mk-footer a:hover { color: #fff; }
.eq-mk-footer li { margin-bottom: 0.4rem; }
.eq-mk-footer .eq-mark-word b { color: #7dd3fc; }
.eq-mk-footer-heading { color: #fff; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.75rem; }
.eq-mk-footer-base { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }


/* ==========================================================================
   Landing page designer (settings/landing_pages/show)
   ========================================================================== */
.eq-designer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 1200px) {
  .eq-designer { grid-template-columns: 24rem minmax(0, 1fr); }
}

.eq-designer-controls {
  background: #fff;
  border: 1px solid var(--eq-line);
  border-radius: var(--eq-radius);
  box-shadow: var(--eq-shadow-sm);
  overflow: hidden;
}

@media (min-width: 1200px) {
  .eq-designer-controls { position: sticky; top: 1.25rem; max-height: calc(100vh - 2.5rem); overflow-y: auto; }
}

.eq-designer-tabs { padding: 0.5rem 0.75rem 0; background: #fafbfc; }
.eq-designer-tabs .nav-link { padding: 0.5rem 0.7rem; font-size: 0.9rem; }
.eq-designer-panel { padding: 1.25rem; }

.eq-designer-heading {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--eq-muted);
  margin: 0 0 0.65rem;
}

.eq-designer-save {
  position: sticky;
  bottom: 0;
  padding: 0.9rem 1.25rem;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--eq-line);
}

.eq-designer-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.eq-designer-choices-4 { grid-template-columns: repeat(4, 1fr); }

.eq-designer-choice {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.6rem;
  border: 1.5px solid var(--eq-line);
  border-radius: var(--eq-radius-sm);
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
  align-items: stretch;
}

.eq-designer-choice:hover { border-color: #c8d1dd; }

.eq-designer-choice:has(input:checked) {
  border-color: var(--eq-brand-500);
  box-shadow: 0 0 0 3px var(--eq-brand-100);
}

.eq-designer-choice:has(input:focus-visible) { outline: 2px solid var(--eq-brand-600); outline-offset: 2px; }

.eq-designer-choice-note { font-size: 0.72rem; line-height: 1.3; }

/* Little wireframes of each layout. i = headline, b = form, em = photo. */
.eq-layout-thumb {
  position: relative;
  height: 3.6rem;
  border-radius: 0.35rem;
  background: #f1f4f8;
  overflow: hidden;
}

.eq-layout-thumb i, .eq-layout-thumb b, .eq-layout-thumb em { position: absolute; border-radius: 2px; }
.eq-layout-thumb i { background: #94a3b8; height: 0.35rem; }
.eq-layout-thumb b { background: #fff; border: 1px solid #cbd5e1; }
.eq-layout-thumb em { background: #bae6fd; }

.eq-layout-thumb-classic i { left: 10%; top: 22%; width: 38%; }
.eq-layout-thumb-classic em { left: 10%; top: 45%; width: 38%; height: 35%; }
.eq-layout-thumb-classic b { right: 10%; top: 15%; width: 34%; height: 70%; }

.eq-layout-thumb-cover em { inset: 0; background: linear-gradient(135deg, #7dd3fc, #0369a1); border-radius: 0; }
.eq-layout-thumb-cover i { left: 10%; top: 40%; width: 34%; background: #fff; }
.eq-layout-thumb-cover b { right: 10%; top: 18%; width: 34%; height: 64%; }

.eq-layout-thumb-centered em { left: 15%; right: 15%; top: 10%; height: 25%; }
.eq-layout-thumb-centered i { left: 30%; right: 30%; top: 44%; }
.eq-layout-thumb-centered b { left: 28%; right: 28%; top: 58%; height: 32%; }

.eq-designer-hero-thumb img { width: 100%; border-radius: var(--eq-radius-sm); }

.eq-designer-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.eq-designer-gallery-item { display: flex; flex-direction: column; gap: 0.25rem; cursor: pointer; }
.eq-designer-gallery-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 0.4rem; }

.eq-designer-sections { display: grid; gap: 0.5rem; }

.eq-designer-section {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.6rem 0.6rem 0.4rem;
  background: #fff;
  border: 1px solid var(--eq-line);
  border-radius: var(--eq-radius-sm);
  cursor: grab;
}

.eq-designer-section.eq-dragging { opacity: 0.4; }
.eq-designer-grip { color: #a3adbd; font-size: 1.1rem; }

.eq-designer-stage {
  background: #fff;
  border: 1px solid var(--eq-line);
  border-radius: var(--eq-radius);
  box-shadow: var(--eq-shadow-sm);
  overflow: hidden;
}

.eq-designer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--eq-line);
  background: #fafbfc;
}

.eq-designer-live {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 0.45rem;
  box-shadow: 0 0 0 3px #dcfce7;
}

/* Sized by page_designer_controller#fit: desktop renders 1280px wide and
   is scaled to the panel; phone renders at 390px, unscaled. */
.eq-designer-viewport {
  position: relative;
  background: #e9edf3;
  overflow: hidden;
}

.eq-designer-frame {
  border: 0;
  background: #fff;
  display: block;
}

.eq-designer-viewport-mobile {
  display: flex;
  justify-content: center;
  padding: 1.25rem 0;
}

.eq-designer-viewport-mobile .eq-designer-frame {
  width: 390px;
  border-radius: 1.5rem;
  box-shadow: 0 0 0 10px #0b1324, var(--eq-shadow-lg);
}

/* ---- Quote designer ------------------------------------------------------ */
/* Thumbnails of each price-detail level: i = a line, b = the total. */
.eq-detail-thumb {
  position: relative;
  height: 3.6rem;
  border-radius: 0.35rem;
  background: #f1f4f8;
  padding: 0.5rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.eq-detail-thumb i {
  height: 0.3rem;
  border-radius: 2px;
  background: linear-gradient(90deg, #94a3b8 0 58%, transparent 58% 74%, #64748b 74% 100%);
}

.eq-detail-thumb b { height: 0.45rem; border-radius: 2px; background: var(--eq-brand-600); margin-top: auto; width: 45%; align-self: flex-end; }
.eq-detail-thumb-items_only i { background: linear-gradient(90deg, #94a3b8 0 70%, transparent 70%); }
.eq-detail-thumb-total_only i { visibility: hidden; }
.eq-detail-thumb-total_only b { align-self: center; width: 55%; height: 0.7rem; margin: auto 0; }

/* ---- Customer email designer -------------------------------------------- */
.eq-designer-choices-2 { grid-template-columns: repeat(2, 1fr); }

.eq-designer-email-label {
  padding: 0.75rem 0.9rem;
  border-radius: var(--eq-radius-sm);
  background: var(--eq-brand-50);
  border: 1px solid #d6ecfa;
}

.eq-designer-tags {
  padding: 0.85rem;
  border: 1px dashed #cdd5e0;
  border-radius: var(--eq-radius-sm);
}

.eq-tag-chip {
  --bs-btn-padding-y: 0.15rem;
  --bs-btn-padding-x: 0.5rem;
  --bs-btn-font-size: 0.78rem;
  --bs-btn-color: var(--eq-brand-700);
  --bs-btn-bg: var(--eq-brand-50);
  --bs-btn-border-color: #bae6fd;
  --bs-btn-hover-color: var(--eq-brand-700);
  --bs-btn-hover-bg: var(--eq-brand-100);
  --bs-btn-hover-border-color: var(--eq-brand-500);
  font-family: SFMono-Regular, Menlo, Consolas, monospace;
  box-shadow: none;
}

/* Quote designer thumbnails: layouts (i = reading column, b = price
   card), palettes (i = the top, b = a card, em = the accent button),
   type, corners and the photo choice. */
.eq-qlayout-thumb, .eq-qpalette-thumb, .eq-qfont-thumb, .eq-qcorner-thumb, .eq-qphoto-thumb {
  position: relative;
  height: 3.6rem;
  border-radius: 0.35rem;
  background: #f1f4f8;
  overflow: hidden;
}

.eq-qlayout-thumb i, .eq-qlayout-thumb b, .eq-qlayout-thumb em,
.eq-qpalette-thumb i, .eq-qpalette-thumb b, .eq-qpalette-thumb em { position: absolute; border-radius: 2px; }

.eq-qlayout-thumb-classic i { left: 25%; right: 25%; top: 12%; height: 30%; background: #fff; border: 1px solid #cbd5e1; }
.eq-qlayout-thumb-classic b { left: 25%; right: 25%; top: 52%; height: 36%; background: #fff; border: 1px solid var(--eq-brand-500); }
.eq-qlayout-thumb-split i { left: 10%; width: 46%; top: 12%; bottom: 12%; background: #fff; border: 1px solid #cbd5e1; }
.eq-qlayout-thumb-split b { right: 10%; width: 28%; top: 12%; height: 50%; background: #fff; border: 1px solid var(--eq-brand-500); }

.eq-qpalette-thumb { background: var(--bg); border: 1px solid var(--line); }
.eq-qpalette-thumb i { left: 0; right: 0; top: 0; height: 28%; background: var(--top); border-bottom: 1px solid var(--line); border-radius: 0; }
.eq-qpalette-thumb b { left: 14%; right: 14%; top: 40%; height: 26%; background: #fff; border: 1px solid var(--line); }
.eq-qpalette-thumb em { right: 14%; width: 30%; top: 74%; height: 14%; background: var(--accent); }

.eq-qfont-thumb { display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 700; color: #1A1A18; }

.eq-qcorner-thumb { display: flex; align-items: center; justify-content: center; }
.eq-qcorner-thumb i { width: 55%; height: 60%; background: #fff; border: 1.5px solid #94a3b8; border-radius: calc(var(--r) * .6); }

.eq-qphoto-thumb { display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: #64748b; }

/* Five tabs in a narrow panel: tighten them. */
.eq-designer-tabs .nav-link { padding: 0.5rem 0.55rem; font-size: 0.85rem; }

/* ==========================================================================
   Financial reports (financials/budgets, financials/cashflows)

   Chart colours are three validated categorical slots (blue, orange,
   aqua) used in fixed order — revenue / cash in, cost / cash out, profit /
   net. Open quotes are the same hue hatched over a tint, so "sold" and
   "hoped for" read apart without a second colour. Aqua is under 3:1 on
   white, so every chart has a legend and a full table beneath it.
   ========================================================================== */
.eq-viz {
  --viz-1: #2a78d6;
  --viz-2: #eb6834;
  --viz-3: #1baf7a;
  --viz-0: #8a93a3;
  --viz-grid: #edf0f4;
  --viz-axis: #c3cad6;
}

.eq-viz-svg { display: block; width: 100%; height: auto; overflow: visible; }
.eq-viz-grid line { stroke: var(--viz-grid); stroke-width: 1; shape-rendering: crispEdges; }
.eq-viz-baseline { stroke: var(--viz-axis); stroke-width: 1; shape-rendering: crispEdges; }
.eq-viz-tick { fill: var(--eq-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.eq-viz-tick-current { fill: var(--eq-ink); font-weight: 600; }
.eq-viz-year { fill: var(--eq-ink-2); font-size: 11px; font-weight: 600; }
.eq-viz-year-rule { stroke: var(--viz-axis); stroke-width: 1; shape-rendering: crispEdges; }

.eq-viz-fill-1 { fill: var(--viz-1); }
.eq-viz-fill-2 { fill: var(--viz-2); }
.eq-viz-fill-3 { fill: var(--viz-3); }
.eq-viz-hatch-bg-1 { fill: color-mix(in srgb, var(--viz-1) 22%, #fff); }
.eq-viz-hatch-bg-2 { fill: color-mix(in srgb, var(--viz-2) 22%, #fff); }
.eq-viz-hatch-bg-3 { fill: color-mix(in srgb, var(--viz-3) 22%, #fff); }

.eq-viz-seg { transition: opacity 0.15s ease; }
.eq-viz.is-hovering .eq-viz-slot:not(.is-active) .eq-viz-seg { opacity: 0.35; }
.eq-viz-line { fill: none; stroke: var(--eq-ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.eq-viz-dot { fill: var(--eq-ink); stroke: #fff; stroke-width: 2; }

.eq-viz-hit { fill: transparent; cursor: pointer; outline: none; }
.eq-viz-hit:hover, .eq-viz-hit:focus-visible { fill: rgba(11, 19, 36, 0.035); }
.eq-viz-hit:focus-visible { stroke: var(--eq-brand); stroke-width: 1.5; }

.eq-viz-tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  min-width: 11rem;
  padding: 0.6rem 0.75rem;
  background: #fff;
  border: 1px solid var(--eq-line);
  border-radius: var(--eq-radius-sm);
  box-shadow: var(--eq-shadow);
  font-size: 0.8rem;
}
.eq-viz-tip-table td { padding: 0.1rem 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eq-viz-tip-hint { font-size: 0.72rem; }
.eq-viz-empty { position: absolute; inset: 40% 0 auto; text-align: center; }

.eq-swatch {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
  vertical-align: -0.05rem;
  margin-right: 0.35rem;
  background: var(--c);
}
.eq-swatch-0 { --c: var(--viz-0, #8a93a3); }
.eq-swatch-1 { --c: var(--viz-1, #2a78d6); }
.eq-swatch-2 { --c: var(--viz-2, #eb6834); }
.eq-swatch-3 { --c: var(--viz-3, #1baf7a); }
.eq-swatch-hatch {
  background: repeating-linear-gradient(45deg, var(--c) 0 2px, color-mix(in srgb, var(--c) 22%, #fff) 2px 4.5px);
}
.eq-viz-legend .eq-swatch { margin-right: 0; }
.eq-swatch-line { display: inline-block; width: 1.1rem; height: 2px; background: var(--eq-ink); position: relative; }
.eq-swatch-line::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%; background: var(--eq-ink); box-shadow: 0 0 0 2px #fff;
}

.eq-report-filters .card-body { row-gap: 0.75rem; }
.eq-report-toggle .btn { white-space: nowrap; }

.eq-report-table thead th { white-space: nowrap; }
.eq-report-table td, .eq-report-table th { font-variant-numeric: tabular-nums; }
.eq-sort-button {
  background: none; border: 0; padding: 0; font: inherit; color: inherit;
  text-transform: inherit; letter-spacing: inherit; cursor: pointer;
}
.eq-sort-button::after { content: "\2195"; opacity: 0.3; margin-left: 0.3rem; font-size: 0.85em; }
th[aria-sort="ascending"] .eq-sort-button::after { content: "\2191"; opacity: 0.8; }
th[aria-sort="descending"] .eq-sort-button::after { content: "\2193"; opacity: 0.8; }

.eq-expand-button, .eq-expand-spacer {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; margin-right: 0.25rem; vertical-align: middle;
}
.eq-expand-button { border: 0; background: none; border-radius: 0.375rem; color: var(--eq-muted); }
.eq-expand-button:hover { background: var(--eq-canvas); color: var(--eq-ink); }
.eq-expand-button i { transition: transform 0.15s ease; }
.eq-expand-button[aria-expanded="true"] i { transform: rotate(90deg); }

.eq-report-row-empty td { color: var(--eq-muted); }
.eq-report-detail > td { background: var(--eq-canvas); }
.eq-report-jobs { --bs-table-bg: transparent; margin-left: 2rem; width: calc(100% - 2rem); }
.eq-report-jobs th { font-size: 0.72rem; color: var(--eq-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.eq-report-pipeline td { color: var(--eq-ink-2); }
.eq-report-pipeline td:first-child { font-style: italic; }

@keyframes eq-report-flash { from { background: var(--eq-brand-100); } to { background: transparent; } }
.eq-report-flash > .eq-report-row > td { animation: eq-report-flash 1.6s ease-out; }

.eq-report-assumptions summary { cursor: pointer; list-style: none; }
.eq-report-assumptions summary::-webkit-details-marker { display: none; }
.eq-report-assumptions summary::after { content: "\25B8"; float: right; color: var(--eq-muted); transition: transform 0.15s ease; }
.eq-report-assumptions[open] summary::after { transform: rotate(90deg); }

@media print {
  .eq-report-filters, .eq-viz-tooltip, .eq-expand-button { display: none !important; }
  .eq-report-detail { display: table-row !important; }
}

/* ==========================================================================
   Standard items: the item picker and the Items settings page
   ========================================================================== */
.eq-picker-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  min-width: 18rem;
  max-height: 18rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.25rem;
  background: #fff;
  border: 1px solid var(--eq-line);
  border-radius: var(--eq-radius-sm);
  box-shadow: var(--eq-shadow);
}
.eq-picker-heading {
  padding: 0.35rem 0.5rem 0.15rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--eq-muted);
}
.eq-picker-option { display: flex; flex-direction: column; padding: 0.35rem 0.5rem; border-radius: 0.375rem; cursor: pointer; }
.eq-picker-option.is-active, .eq-picker-option:hover { background: var(--eq-brand-50); }
.eq-picker-name { font-size: 0.875rem; color: var(--eq-ink); }
.eq-picker-meta { font-size: 0.72rem; color: var(--eq-muted); }
.eq-picker-create { flex-direction: row; align-items: center; gap: 0.3rem; color: var(--eq-brand-700); font-size: 0.875rem; border-top: 1px solid var(--eq-line); margin-top: 0.25rem; }
.eq-picker-note { padding: 0.5rem; font-size: 0.8rem; color: var(--eq-muted); }
.eq-picker-create-panel {
  position: absolute;
  z-index: 20;
  left: 0;
  top: calc(100% + 4px);
  width: max(100%, 22rem);
  padding: 0.75rem;
  background: #fff;
  border: 1px solid var(--eq-line);
  border-radius: var(--eq-radius-sm);
  box-shadow: var(--eq-shadow);
}
.eq-badge-own { background: var(--eq-brand-50); color: var(--eq-brand-700); border: 1px solid #bae6fd; }

/* Settings -> Measurement: the chosen provider in each stage stands out. */
.eq-stage-option { transition: background 0.15s ease, border-color 0.15s ease; }
.eq-stage-option:has(> .d-flex > input:checked), label.eq-stage-option:has(> input:checked) {
  border-color: var(--eq-brand) !important;
  background: var(--eq-brand-50);
}

/* Settings -> Landing page -> On your own website */
.eq-embed-preview { display: block; width: 100%; height: 640px; border: 0; background: #fff; }
.eq-embed-code { font-size: 0.75rem; white-space: pre; }

/* ---- Address suggestions (address-autocomplete) ---------------------- */
.eq-address { position: relative; }
.eq-address-menu {
  position: absolute; z-index: 1060; top: calc(100% + 2px); left: 0; right: 0;
  margin: 0; padding: 4px; list-style: none; max-height: 18rem; overflow-y: auto;
  background: var(--bs-body-bg, #fff); border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: var(--bs-border-radius, .375rem); box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
}
.eq-address-option {
  display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; cursor: pointer;
  border-radius: calc(var(--bs-border-radius, .375rem) - 2px); text-align: left;
}
.eq-address-option:hover, .eq-address-option[aria-selected="true"] { background: var(--bs-tertiary-bg, #f1f5f9); }
.eq-address-main { font-weight: 600; color: var(--bs-body-color, #1e293b); }
.eq-address-secondary { font-size: .85em; color: var(--bs-secondary-color, #64748b); }

/* ---- Document review (projects/document_imports/show) ---------------- */
.eq-review-line .min-w-0 { min-width: 0; }
.eq-review-row-off .min-w-0 { opacity: .45; }
.eq-review-viewer { position: sticky; top: 1rem; }
.eq-review-viewer iframe, .eq-review-viewer img { width: 100%; height: calc(100vh - 9rem); min-height: 480px; border: 0; background: var(--bs-tertiary-bg, #f1f5f9); }
.eq-review-viewer img { height: auto; min-height: 0; max-height: calc(100vh - 9rem); object-fit: contain; }
.eq-page-link { font-variant-numeric: tabular-nums; }

