/* Blueprint structural overrides (global) */
:root {
  --font-size-base: 16px;
  --font-size-small: 14px;
  --line-height-base: 1.6;
  --bg: #eef3fa;
  --paper: #eef3fa;
  --paper2: #eef3fa;
  --surface: #ffffff;
  --surface2: #eef3fa;
  --ink: #0b1729;
  --ink2: #0f2d5e;
  --text: #0b1729;
  --muted: #435778;
  --muted2: #5b7095;
  --border: #d0dcf0;
  --border2: #d0dcf0;
  --line: #d0dcf0;
  --accent: #1d4ed8;
  --accent2: #1840c0;
  --gold: #38bdf8;
  --gold2: #38bdf8;
  --gold-bg: #eaf6ff;
  --nri-ink: #0f2d5e;
  --sidebar: #0f2d5e;
  --step-active: #38bdf8;
  --step-done: #38bdf8;
  --brand-mark-url: none;
  --brand-mark-size: 0;
  --brand-mark-overlap: 0;
  --brand-mark-shift-x: 0;
  --brand-mark-shift-y: 0;
}

html {
  background: #eef3fa !important;
  font-size: var(--font-size-base) !important;
}

body {
  background: transparent !important;
  color: var(--ink) !important;
  position: relative;
  font-size: var(--font-size-base) !important;
  line-height: var(--line-height-base) !important;
}

/* Shared logo contract across pages */
:is(.logo, .brand, .footer-logo, .fl, .brand-logo, .sidebar-logo, .nav-logo, .rm-footer-brand) {
  font-family: "Epilogue", "Noto Sans", system-ui, sans-serif !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  letter-spacing: -0.5px !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  vertical-align: middle;
}

:is(.logo, .brand, .brand-logo, .sidebar-logo, .nav-logo) {
  gap: 0 !important;
}

:is(.logo, .brand, .brand-logo, .sidebar-logo, .nav-logo)::before {
  content: none !important;
  display: none !important;
}

:is(.logo, .brand, .footer-logo, .fl, .brand-logo) {
  color: var(--ink) !important;
}

:is(.logo, .brand, .footer-logo, .fl, .brand-logo) span {
  color: var(--accent) !important;
}

:is(.logo, .brand, .footer-logo, .fl, .brand-logo):hover {
  color: var(--ink) !important;
  opacity: 0.92 !important;
}

.sidebar-logo {
  color: #ffffff !important;
}

.sidebar-logo span {
  color: #38bdf8 !important;
}

.nav-logo {
  color: #ffffff !important;
}

.nav-logo span {
  color: #38bdf8 !important;
}

:is(.sidebar-logo, .nav-logo)::before {
  content: none !important;
  display: none !important;
}

/* Sidebar icon visibility hardening */
.nav-icon {
  opacity: 0.96 !important;
}

.nav-icon svg {
  stroke-width: 2.15 !important;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
  opacity: 1 !important;
}

.nav-item[href*="new-agreement"] .nav-icon svg path,
.nav-item[href*="agreement-generator"] .nav-icon svg path {
  fill: currentColor !important;
  stroke: none !important;
}

/* Remove warm paper/noise overlays */
body::before {
  content: none !important;
  display: none !important;
  background: none !important;
}

/* Blueprint signature grid */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(29, 78, 216, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(29, 78, 216, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Sidebar/nav shell */
.sidebar,
.side-nav,
.app-sidebar,
[class~="sidebar"] {
  background: #0f2d5e !important;
}

.sidebar .nav-item,
.app-sidebar .nav-item,
[class~="sidebar"] .nav-item {
  color: #9fb3d6 !important;
  background: transparent !important;
}

.sidebar .nav-item:hover,
.sidebar .nav-item.active,
.app-sidebar .nav-item:hover,
.app-sidebar .nav-item.active,
[class~="sidebar"] .nav-item:hover,
[class~="sidebar"] .nav-item.active {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

.sidebar a.active,
.sidebar .active,
.side-nav a.active,
.side-nav .active,
.nav a.active,
.nav-link.active,
.menu a.active {
  border-left: 3px solid #38bdf8 !important;
  box-shadow: inset 3px 0 0 #38bdf8 !important;
}

/* Dark product sections */
.how-sec,
.cta-sec,
.nri-sec,
.ticker-wrap,
.how-it-works,
.nri-spotlight,
.final-cta,
.dark-section,
.cta-section,
.ticker,
.ticker-bar {
  background: #0f2d5e !important;
}

.launch-bar {
  background: #0f2d5e !important;
}

nav {
  background: rgba(238, 243, 250, 0.96) !important;
}

.ticker-wrap {
  border-top-color: #38bdf8 !important;
}

.ticker-wrap .ti {
  color: rgba(234, 245, 255, 0.9) !important;
}

.ticker-wrap .ti strong {
  color: #ffffff !important;
}

.ticker-wrap .tdot {
  background: #38bdf8 !important;
}

.how-sec .how-lbl,
.nri-sec .nri-lbl,
.cta-sec .cta-ey,
.launch-text {
  color: rgba(234, 245, 255, 0.82) !important;
}

.how-sec .how-lbl::after {
  background: rgba(56, 189, 248, 0.35) !important;
}

.how-sec .how-sub,
.how-sec .step-d,
.nri-sec .nri-sub,
.nri-sec .nf-d,
.nri-sec .ng-sub,
.nri-sec .nc-sub,
.cta-sec .cta-sub,
.cta-sec .cta-ri {
  color: #c8d6ee !important;
}

.how-sec .steps {
  background: #143764 !important;
}

.how-sec .step-arr {
  color: #2d5f9f !important;
}

.nri-sec .nf,
.nri-sec .nri-card,
.nri-sec .nri-globe {
  background: #12386f !important;
  border-color: #2d5f9f !important;
}

.nri-sec .btn-nri-gh {
  color: #dbeafe !important;
  border-bottom-color: #2d5f9f !important;
}

.nri-sec .btn-nri-gh:hover {
  color: #ffffff !important;
  border-bottom-color: #38bdf8 !important;
}

/* Primary CTAs */
.btn-primary,
.btn-main,
.btn-solid,
.btn-pay-now,
.btn-nav,
.btn-cta,
.pc-fill,
.cta,
.cta-primary,
.btn-gold,
.btn-nri,
.metro-nri-btn {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
}

.btn-primary:hover,
.btn-main:hover,
.btn-solid:hover,
.btn-pay-now:hover,
.btn-nav:hover,
.btn-cta:hover,
.pc-fill:hover,
.cta:hover,
.cta-primary:hover,
.btn-gold:hover,
.btn-nri:hover,
.metro-nri-btn:hover {
  background: #1840c0 !important;
  border-color: #1840c0 !important;
}

/* Active/focus */
:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 2px;
}

.step.active,
.step.current,
.progress-dot.active,
.dot.active,
.preview-tab.active,
.aud-btn.active,
.tab.active {
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
}

/* NRI accents: cerulean instead of gold */
.nri-sec em,
.nri-h em,
.nri-title .accent,
.nri-explainer h2 em,
.nri-badge,
.nri .check,
.nri .accent,
.nri [class*="gold"] {
  color: #38bdf8 !important;
}

.nri-cards .popular-badge,
.nri .popular-badge {
  background: #38bdf8 !important;
  color: #0b1729 !important;
}

/* Global readability pass */
:is(
  p,
  li,
  label,
  input,
  select,
  textarea,
  button,
  .muted,
  .field-hint,
  .meta,
  .caption,
  .sub,
  .helper,
  .support-note,
  small
) {
  line-height: var(--line-height-base) !important;
}

:is(input, select, textarea, button) {
  font-size: var(--font-size-base) !important;
}

:is(
  .muted,
  .field-hint,
  .meta,
  .caption,
  .sub,
  .helper,
  .support-note,
  small
) {
  font-size: var(--font-size-small) !important;
  color: var(--muted) !important;
}

::placeholder {
  color: #5b7095 !important;
  opacity: 1 !important;
}

/* Shared global footer (auto-injected on pages missing a footer) */
.rm-global-footer {
  margin-top: 56px;
  border-top: 1px solid var(--border);
  background: rgba(238, 243, 250, 0.9);
  width: 100%;
  clear: both;
  align-self: stretch;
  flex: 0 0 100%;
}

.rm-global-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 24px 20px;
}

.rm-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.rm-footer-brand {
  font-family: "Epilogue", sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--ink);
  margin: 0 0 12px;
}

.rm-footer-brand span {
  color: var(--accent);
}

.rm-footer-copy {
  margin: 0;
  color: var(--muted);
  max-width: 320px;
  font-size: 15px;
  line-height: 1.5;
}

.rm-footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.rm-footer-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  padding: 6px 10px;
  font-size: 11px;
  color: var(--muted);
  background: #f5f9ff;
}

.rm-footer-col h4 {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink2);
  font-family: "Epilogue", sans-serif;
}

.rm-footer-col a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.45;
}

.rm-footer-col a:hover {
  color: var(--accent);
}

.rm-footer-meta {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.rm-footer-meta-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.rm-footer-meta-links a {
  color: var(--muted);
  text-decoration: none;
}

.rm-footer-meta-links a:hover {
  color: var(--accent);
}

@media (max-width: 1024px) {
  .rm-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px 18px;
  }

  .rm-footer-brand {
    font-size: 24px;
  }

  .rm-footer-copy,
  .rm-footer-col a {
    font-size: 14px;
  }
}

@media (max-width: 680px) {
  .rm-global-footer-inner {
    padding: 28px 16px 20px;
  }

  .rm-footer-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .rm-footer-brand {
    font-size: 22px;
  }

  .rm-footer-copy {
    font-size: 14px;
  }

  .rm-footer-col a {
    font-size: 13px;
  }

  .rm-footer-meta {
    font-size: 12px;
  }
}
